|~~#~~|mkdir foo \\ mkdir foo/baz \\ … | |:::| mkdir -p foo/baz/bar foo/bar foobaz/bar| |~~#~~|rmdir foo/baz/bar \\ rmdir foo/baz| |~~#~~|echo "foo" > file1 \\ ln file1 file2 \\ echo "bar" > file2 \\ cat file1| |~~#~~|cd \\ ln -s /tmp TMP \\ cd TMP \\ pwd| |~~#~~|# second column of "ls -l" results| |:::|ln -s /tmp ~/TMP \\ cd ~/TMP \\ pwd| |~~#~~|cd \\ ln -s . loop \\ cd loop \\ cd loop \\ pwd| |~~#~~|ln -s /nonexistent/path brokenSymlink \\ ls -l| |~~#~~|cp /etc/os-release /etc/SUSE-brand .| |~~#10~~|cp -a someDir newDir| |~~#~~|mv newDir someDir| |~~#~~|mv someDir anotherDir| |~~#~~|cp -al anotherDir yetAnotherDir \\ echo "modified" > yetAnotherDir/file2 \\ tree -D --timefmt=%H:%M:%S anotherDir yetAnotherDir \\ # fileów anotherDir/file2 i yetAnotherDir/file2| |~~#~~|cd /tmp \\ touch example \\ scp example student@lab-sec-1:example| |:::|cd /tmp \\ touch example \\ scp example student@lab-sec-1:| |~~#~~|scp /tmp/example student@lab-sec-1:/tmp| |~~#~~|cd /tmp \\ sftp student@lab-sec-1 \\ sftp> cd /tmp \\ sftp> put example | |:::|sftp student@lab-sec-1 \\ sftp> cd /tmp \\ sftp> put /tmp/example | |:::|sftp student@lab-sec-1 \\ sftp> cd /tmp \\ sftp> lcd /tmp \\ sftp> put example | |~~#~~|touch file_{a..z} \\ rm file_? \\ touch file_{a..z} \\ rm -f file_? \\ … | |~~#~~|rm file_? \\ rm -f file_?| |~~#~~|mkdir someDir \\ rm -r someDir| |~~#~~|sleep 2| |~~#~~|time sleep 2| |~~#~~|time openssl dhparam -text 1536| |~~#~~|timeout 5s openssl dhparam -text 2048| |~~#~~|ps| |~~#~~|ps -l| | ::: |ps -f| | ::: |ps -F| | ::: |ps u| |~~#~~|ps -e| | ::: |ps ax| |~~#~~|ps -T \\ # a process with two threads is displayed as two lines with same pid (and different tids)| | ::: |ps -L| |~~#~~|pstree| | ::: |ps -eH| |~~#~~|pstree -p| | ::: |ps -eH| |~~#~~|cat /proc/self/status \\ # the status is shown for the cat process| |~~#32~~|top \\ # 'P' / 'M' sort by CPU / memory, besides '<' and '>' select sort columns| |~~#~~|# Running, Sleeping, D → stalled on I/O (disk access), t → paused while debugging, Zombie| |~~#~~|htop \\ # '<' and '>' opens a sort menu \\ # or: mouse click on column name| |~~#~~|htop \\ # 'F5' and 't' toggle tree view \\ # 'F3' and '/' search, once search term is set, 'F3' jumps to ext occurrence| |~~#~~|sleep 1h \\ pgrep sleep| | ::: |sleep 1h \\ pidof sleep| | ::: |sleep 1h \\ pgrep -f 'sleep 1h'| |~~#~~|sleep 1337h \\ sleep 42h \\ pgrep -f '1337h'| |~~#~~|pgrep 'gdm$'| | ::: |pidof gdm| |~~#~~|sleep 1h \\ pgrep sleep \\ # or e.g., ps -e , pstree -p , htop … \\ kill //pid// | |~~#~~|sleep 1h \\ pkill sleep| |~~#~~|# select "run…" from the panel, input "mousepad" \\ pkill -STOP mousepad \\ # notice that mousepad froze \\ pkill -CONT mousepad \\ # mousepad is now responsive| |~~#~~|named -g -c <(:) \\ pkill -HUP named \\ # named states that it reloaded all configuration and zone files| |~~#~~|nice -n 10 sleep 1h \\ ps -el \\ # or htop | |~~#~~|sleep 1h \\ pgrep sleep \\ renice 15 //pid// | |~~#~~|taskset -pc 0 $$ \\ openssl dhparam -text %%$((2**14))%% \\ # ×2 \\ htop \\ # limit results to openssl by 'F4' or '\' \\ # 'F8' increases niceness| | ::: |taskset -pc 0 $$ \\ openssl dhparam -text %%$((2**14))%% foobazbar \\ # ×2 \\ htop \\ # search for openssl with 'F3' or '/' \\ pgrep -f foobazbar \\ renice -n 1 //pid// \\ renice -n 2 //pid// \\ ... | ~~META: language = en ~~