Sunday, July 9, 2017

View pfSense Disk Usage

If your disk is full and you are running ntopng, go to ntopng settings and delete ntopng data.  This is most likely the issue.

Execute the following from a command prompt in pfSense.

Display directory sizes:
du -h -d1 /

Display 20 largest directories in descending order:
du -h -d1 / | sort -rh | head -n 20

Display 20 largest files:
du -mah | sort -rh | head -n 20

Display directory contents with file sizes in descending order.
ls -lhS

Display specific directory contents with file sizes in descending order:
ls -lhS /var

Recursive directory list:
ls -R

List directories with full path:
ls -d $PWD/*

Check File System Disk Space Usage:
df

Display Information of all File System Disk Space Usage:
df -a

Show Disk Space Usage in Human Readable Format:
df -h

Display File System Type:
df -T

Display disk usage statistics for a specific directory:
du /var