28 March, 2021

Linux Tools

find

Find files and folders with find command:

find . -name "node_modules" -type d -prune
find . -name "node_modules" -type d -prune -print -exec rm -rf '{}' \;

tar

tar -cvpzf /backup/phyrum.tar.gz phyrum
tar -xvpzf /backup/phyrum.tar.gz -C /home/phyrum

Other

cat - Print content of file to the standard out

tail - Print last 10 lines of a file to the standard out

tail -f - Follow content

top htop - List process usage

wc -c - Count characters

od -c - Dump file in octal