Files
general-scripts-and-system-…/customscripts/dirstatt
T
2025-11-07 22:01:53 -07:00

16 lines
291 B
Bash

#!/bin/bash
# Usage
# dirstat <path>
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)"
uptime