Archive for August, 2012

Download file with SCP linux / Terminal

Very simple really, using ssh connection and grabbing a single file to the current directory

scp user@server.com:/home/your-site/www/mysql-backup.sql.gz .

To desktop

scp user@server.com:/home/your-site/www/mysql-backup.sql.gz ~/Desktop/

Syncing a whole folder and it’s permissions

-R is recursive
-p is keeping intact the permissions, structures, creation times etc.

scp -pR user@server.com:/home/your-site/www/mysql-backup.sql.gz ~/Desktop/