List file sizes:
du -sh *
Symlink/Junction windows folders:
mklink /J C:\folder\to\create C:\existing\folder\to\symlink
Unzip file:
sudo unzip latest.zip -d /var/www
Copy folder including files:
cp -r /home/hope/files/* /home/hope/backup
Remove folder + subfolders + files:
Be carefull with the f
flag, it can not be undone
rm -rf /etc/var/www/somedir
Secure copy (SCP):
Copy folder from remote to the local host:
scp -r -P 12345 [email protected]:/home/user/daily_backups /e/local/directory
Copy from remote to the local host:
scp [email protected]:file.txt /some/local/directory
Copy from local to a remote host:
scp file.txt [email protected]:/some/remote/directory
Copy the directory from local to remote host's:
scp -r [email protected]:/path/to/foo /some/remote/directory
Copy from remote to remote:
scp [email protected]:/some/remote/directory/foobar.txt \[email protected]:/some/remote/directory/
Copy multiple files from local to remote $HOME dir:
scp foo.txt bar.txt [email protected]:~
Copy file from local to remote using port 4321:
scp -P 4321 foobar.txt [email protected]:/some/remote/directory