Skip to content

Instantly share code, notes, and snippets.

@th3hamburgler
Last active December 14, 2015 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save th3hamburgler/5028992 to your computer and use it in GitHub Desktop.
Save th3hamburgler/5028992 to your computer and use it in GitHub Desktop.
List of useful terminal commands
# list files in directory including hidden
ls -f
# Remove all files and directories (recursive removal)
rm -rf /tmp/foo
# copy the contents of file to clipboard (location: ~/.ssh/id_rsa.pub)
cat ~/.ssh/id_rsa.pub | pbcopy
# add public key to fortrabbit server (remove all new lines)
nano -c ~/.ssh/authorized_keys
# Show disk space of given directory
du -h -s images
# Show system space
df -h
# Show directories taking up the most space
du -sh /* | sort -n
# Change permissions of directory
chmod -R 777 app/storage/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment