CLI
Cheatsheet of some Linux Commandlines (CLI)
SSH
Port Forwarding
Forward port 80 on your machine to port 80 on the remote server you are connecting too:
Forward port 80 from your machine to port 80 on 192.168.0.10 which is accessible via the server you want to connect to (server).
Transferring Files
SCP
SCP uses SSH to move files, it’s very similar to FTP but the connection is encrypted.
Basic sending of file from local machine to a server we’ll call “server”
rsync
rsync also uses ssh (by default) for transferring files to remote systems. It has the added benefit of checking the remote system before you transfer files and only transferring files that have changed. There are tons of options you can set, such as compressing the data on the fly, deleting things that don’t exist on the local machine off the remote one, etc.
Here is a basic rsync command:
Another example that keeps the same owner/group, permissions, and file modification times:
This is same as above but compresses the data which is helpfull for slow connection. Doesn’t help at all if you are trasnfering files that are already compressed.
Find and Delete Files
This is how you find a look for files that end in .svn in your current directory and delete them
