Created
September 12, 2014 18:59
-
-
Save dillonhafer/0c81256c2d276d7b7e5f to your computer and use it in GitHub Desktop.
Determine how much space a file or directory takes on disk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function space { | |
SEARCH_PATH='.' | |
if (( $# == 1 )) | |
then | |
SEARCH_PATH=$1 | |
fi | |
du -ch $SEARCH_PATH | grep total | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment