An open API service indexing awesome lists of open source software.

https://github.com/anushadatta/diskstats

📀 Python Linux script to calculate disk usage statistics.
https://github.com/anushadatta/diskstats

disk-usage linux-shell python-script

Last synced: 11 months ago
JSON representation

📀 Python Linux script to calculate disk usage statistics.

Awesome Lists containing this project

README

          

# DiskStats

This is a simple Python script on Linux which is used to traverse the directories and files, determine the size of the directories, and generate a disk usage statistics report in CSV format. Module ```sys.argv``` is used to access the terminal command line.

### Script Execution
To run the script, follow the steps below:

* Set up virtual environment
```bash
~$ virtualenv env
```
* Activate virtual environment
```bash
~$ source env/bin/activate
```
* Install dependencies
```bash
~$ pip install -r requirements.txt
```
* Run script
```bash
~$ ./disk_report.py /TARGET_DIRECTORY/
```