Common SSH commands

List of some common SSH commands and SFTP commands you frequently use.

Frequently used ssh commands

List the files under directory
ls foldername or dir foldername
Rename file
mv oldfile newfile
Copy file
cp filename newfile
Unzip archive
unzip -o zipfile.zip

unzip -o warfile.war
Remove files
 rm filename
Download files from web
wget http://www.interior-dsgn.com/apache/tomcat/tomcat-7/v7.0.47/bin/apache-tomcat-7.0.47.tar.gz
Unzip tar files
tar zxf apache-tomcat-7.0.47.tar.gz
Edit config file on SSH server
vim server.config

Common SFTP commands

Copy file to the SSH server
put filename.zip
Download file from SSH server
get filename.zip