A simple Bash script to analyze disk usage and identify the largest directories and files in a given path.
- Lists top 10 largest directories
- Lists top 10 largest files
- Supports any target path
- Default path is the current directory
git clone https://github.com/Zapwap123/BashScript-Disk-Space-Analyzer
cd BashScript-Disk-Space-Analyzer
chmod +x diskSpaceAnalyzer.sh
./diskSpaceAnalyzer.sh [optional_path]
- If no path is given, it uses the current directory.
- Example:
./diskSpaceAnalyzer.sh /home/user/Documents
- Top 10 Largest Directories: Sorted by size using
du
- Top 10 Largest Files: Sorted by size using
find
anddu
- Bash shell
- Unix-like environment (Linux, macOS)
- Standard utilities:
du
,find
,sort
,head
MIT License