NetworkManager usually puts “127.0.1.1” in /etc/resolv.conf
. To get currently used DNS servers, type:
% nmcli d show | grep DNS
IP4.DNS[1]: 10.1.2.3
IP4.DNS[2]: 10.2.3.4
The work is always in progress.
NetworkManager usually puts “127.0.1.1” in /etc/resolv.conf
. To get currently used DNS servers, type:
% nmcli d show | grep DNS
IP4.DNS[1]: 10.1.2.3
IP4.DNS[2]: 10.2.3.4
#coffee #kawa #hradec
Instead of using Open link from context menu, you can click the link while holding Control key.
In addition to searching forwards (/<i>pattern</i>
), you can search backwards: ?<i>pattern</i>
To summarise syscalls by time or count, use strace -c
. To include child processed, add -f
switch. For example:
λ strace -cf git status
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000008 0 247 24 lstat
0.00 0.000000 0 48 read
0.00 0.000000 0 3 write
... list goes on ...
In Vim, you can exist Insert mode to enter one command using Ctrl–O,
for example: (in insert) Ctrl–O, type :w
, then ↵ Enter, then back to writing.
To quickly in-/decrement number under cursor in Vim, use (in Normal):
When running a for-loop in zsh, you can skip do-done
part, leaving only command, for example:
% for day in Mon Tue Wed Thu; date -d "next $day"
Mon Apr 25 00:00:00 CEST 2016
Tue Apr 26 00:00:00 CEST 2016
Wed Apr 27 00:00:00 CEST 2016
Thu Apr 28 00:00:00 CEST 2016
Caveat: this doesn’t work on multiple commands in one loop — for day in Mon Tue Wed Thu; echo $day; date -d "next $day"
won’t work as expected
In Normal mode, use ~ to switch case of letter under cursor. Similar commands are:
gU<i></i>
– to switch to upper-casegu<i></i>
– to switch to lower-caseFor example: gUU
converts whole line to upper-case and guiw
to convert word surrounder by cursor to lower-case.
You can list mountpoints by file system type using mount -t<i>TYPE</i>
.
Example:
# mount -ttmpfs
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)