Software > Cheat Sheets > BASH
- Grep recursively
- RSync to an alternate port
- Zipping directories recursively
- Count the number of lines of text in a text file
- Secure Copy from a remote host
- Basic User Functions
Grep recursively
grep -r search_string /base-dir/to/search/
RSync to an alternate port
rsync --progress --rsh='ssh -p8023' somefile user@host:somedir/
Zipping directories recursively
zip zip_file_name -r path_to_zip * unzip zip_file_name -d path_to_extract
Count the number of lines of text in a text file
wc -l text.txt
Secure Copy from a remote host
scp user@remote.addr.com:file_name local_path/file_name
Basic User Functions List all users
cat /etc/passwdChange password of a user
sudo passwd user_name