Tuesday, February 8, 2011

Linux Commands Get directory contents from a remote FTP server

1. Create a compressed archive of the current directory:
1tar -cvzf backup.tar.gz ./*
2. Create a compressed archive of a MySQL database dump:
1mysqldump -u username -p password -h host -P port databasename | gzip -c > mysql.sql.gz
3. Get directory contents from a remote FTP server:
1wget -r ftp://username:password@domain.com/directory/*