Linux


tar file copy via ssh

( cd SOURCEDIR && tar cf - . ) | ssh target_address "(cd DESTDIR && tar xpf - )"

Number of files in directory (recursive file count)

ls -1R | wc -l

ls -1R | grep .*.mp3 | wc -l

How to find out Memory Slot / Size on Linux?

dmidecode -t 17

Finding a File containing a particular text string in Linux server

Recover MySQL root Password

How to rm files recursively?

find . -name '*attach*' | xargs rm

To be even MORE accurate

find . -name '*attach*' -print0 | xargs -0 rm

Will make sure you process any pesky files with spaces in their names

inode count linux command

find ./ -printf %i'\n' | sort -u | wc -l

rsync with any ssh port linux command

rsync -avz -e "ssh -p 2222" /source/directory/ host@domain.com:/destination/directory/