Skip to content

Instantly share code, notes, and snippets.

@mijimoco
Created February 23, 2017 06:14
Show Gist options
  • Save mijimoco/c93744e5f7e4eab8c107647a8fc52bcf to your computer and use it in GitHub Desktop.
Save mijimoco/c93744e5f7e4eab8c107647a8fc52bcf to your computer and use it in GitHub Desktop.
file directory sizes in linux
du -sh directory_name /* Gives you the size of the directory*/
ls -l filename /* Size of the file*/
ls -l * /* Size of All the files in the current directory */
ls -al * /* Size of All the files including hidden files in the current directory */
ls -al dir/ /* Size of All the files including hidden files in the 'dir' directory */
/*Including -h option (for Ex: ls -lh * or du -sh) will give you size in human readable format (Kb, MB etc..) */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment