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.
- Host: GitHub
- URL: https://github.com/anushadatta/diskstats
- Owner: anushadatta
- License: mit
- Created: 2020-10-17T17:18:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-30T07:45:01.000Z (over 5 years ago)
- Last Synced: 2025-02-05T16:49:03.905Z (about 1 year ago)
- Topics: disk-usage, linux-shell, python-script
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/
```