unzip -l <<FILENAME>> | awk 'BEGIN { OFS="" ; ORS="" } ; { for ( i=4; i<NF; i++ ) print $i " "; print $NF "\n" }' | xargs -I{} rm -v {}
readlink -e <<FILENAME>>
dd bs=1M if=/path/to/MinePeon-2013-XX-XX.img of=/dev/sdX
python -m SimpleHTTPServer
python3 -m http.server
nmap -F 192.168.0.1/24
du -sk * | sort -n
fdisk -l
cat /etc/resolv.conf
cat <<FILENAME>> | source /dev/stdin
xclip -sel clip < ~/.ssh/id_rsa.pub
cat /some/script | ssh user@server
gpg --allow-secret-key-import --import file-enc-privkey.asc
gpg -d config -o config.tar.gz
gunzip -c config.tar.gz | tar xopf -
scp -rp sourcedirectory user@dest:/path
docker daemon --bip 172.17.42.1/<subnet>
go to a project root using after installing ctags with apt install exuberant-ctags
ctags -R *
Which will creates a tags file listing all the definitions. Then you can search the tags in vim using
vim -t <tag>
A tag being the definition being searched for. This can also be achieved in vim itself using Ctrl-]
ncdu
find largest directories
du --max-depth=1 /path | sort -r -k1,1n
sudo update-alternatives --config c++
truncate -s 0 /var/log/syslog
Run tar command to create an archived named file.tar.gz for given directory name by running:
tar -czvf file.tar.gz directory
sudo hdparm -Tt /dev/sdX
(for read/write) or
dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k; rm -f /tmp/output
(for write (but even better if you do it on the same drive as the datadir, instead of /tmp))
sudo df -a -T -h