Skip to content

Disk Space Analyzer is a lightweight Bash utility that helps you quickly identify which directories and files consume the most space on your system. It’s perfect for freeing up storage and managing disk usage with just a single command.

Notifications You must be signed in to change notification settings

Zapwap123/BashScript-Disk-Space-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Disk Space Analyzer

A simple Bash script to analyze disk usage and identify the largest directories and files in a given path.

Features

  • Lists top 10 largest directories
  • Lists top 10 largest files
  • Supports any target path
  • Default path is the current directory

Usage

1. Clone the repository:

git clone https://github.com/Zapwap123/BashScript-Disk-Space-Analyzer
cd BashScript-Disk-Space-Analyzer

2. Make the script executable:

chmod +x diskSpaceAnalyzer.sh

3. Run the script:

./diskSpaceAnalyzer.sh [optional_path]
  • If no path is given, it uses the current directory.
  • Example:
./diskSpaceAnalyzer.sh /home/user/Documents

Output

  • Top 10 Largest Directories: Sorted by size using du
  • Top 10 Largest Files: Sorted by size using find and du

Requirements

  • Bash shell
  • Unix-like environment (Linux, macOS)
  • Standard utilities: du, find, sort, head

License

MIT License

About

Disk Space Analyzer is a lightweight Bash utility that helps you quickly identify which directories and files consume the most space on your system. It’s perfect for freeing up storage and managing disk usage with just a single command.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages