Skip to content

Instantly share code, notes, and snippets.

@johndaley-me
Last active April 16, 2016 03:52
Show Gist options
  • Save johndaley-me/9b4e3ec98cd390c9f249 to your computer and use it in GitHub Desktop.
Save johndaley-me/9b4e3ec98cd390c9f249 to your computer and use it in GitHub Desktop.
Bash help
# list the size of files and folders in order (just by number though so kilobytes can be out of order with megabytes)
du -ksh * | sort -n -r
cat /etc/*-release
uname -a
# tar the working directory but exclude a few folders (hidden folders are excluded by default)
tar --exclude='./folder1' --exclude='folder2/folder3' -zcf something.tar.gz *
# extract
tar -vzxf something.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment