From 4151421cf73747bf88741422353c24bc62caea4c Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Fri, 7 Nov 2025 20:48:52 -0700 Subject: [PATCH] 1762573733 --- customscripts/dirstatt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 customscripts/dirstatt 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