Skip to content

Instantly share code, notes, and snippets.

@faizanayubi
Last active February 13, 2016 18:12
Show Gist options
  • Save faizanayubi/c8198e0df71e681da671 to your computer and use it in GitHub Desktop.
Save faizanayubi/c8198e0df71e681da671 to your computer and use it in GitHub Desktop.
Common Ubuntu Commands
Change folder permissions and ownership
sudo chown -R username:group directory
remove all files and folder
rm -rf foldername
move contents of one foldr to another
mv -v public_html/* /home/mannan/web/viraltabloid.in/public_html/
tar a file
tar -cf folder.tar folder/
untar a file
tar -xvf public_html.tar
copy contents of one folder to another
cp -R old.public_html/wp-content/uploads/2015/08 public_html/wp-content/uploads/2015/
See all open ports on machine
netstat -anltp | grep "LISTEN"
Show disk usage
df -h
Move files
Copy the file "foobar.txt" from a remote host to the local host
$ scp [email protected]:foobar.txt /some/local/directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment