Cheat sheet

List files modified within the last day

find . -mtime -2 -type f -exec ls -l {} \;

Copy files via SSH between

scp -rp /home/user [email protected]:/home/

Delete folders that haven’t been modified more than 7 days

find . -type d -mtime +7 -exec rm -r {} \;

Create a MySql database dump

mysqldump -h localhost -u root -p databasename > dump.sql

Import MySql database dump

mysql -h localhost -u root -p databasename < dump.sql

Write a Comment

Comment