diff --git a/customscripts/dirstatt b/customscripts/dirstatt new file mode 100644 index 0000000..1bf4625 --- /dev/null +++ b/customscripts/dirstatt @@ -0,0 +1,14 @@ +#!/bin/bash +# Usage +# dirstat + +if [ -z "$1" ]; then + path=. +else + path=$1 +fi + +echo -e "\nPath: $path" +echo "Space used: $(du -h -d 0 $path | awk '{print $1}')" +echo "Files: $(find $path -type f -print | wc -l)" +echo "Directories: $(find $path -type d -print | wc -l)" \ No newline at end of file