Skip to content

jobfoldersizes is a python command line tool that utilizes the scandir python module to calculate the folder sizes of a desired root directory.

Notifications You must be signed in to change notification settings

r0b0tAnthony/jobfoldersizes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

What is this repository for?

  • jobfoldersizes is a python command line tool that utilizes the scandir python module to calculate the folder sizes of a desired root directory. Using scandir can increase the efficency over 2.7.x os.walk methods significantly. jobfoldersizes also adds additional filtering and sorting for your results.
  • Version: 1.0

How do I get set up?

Dependencies

This relies on scandir. Scandir you can install via pip, or download as tar directly from the previous link. It is now included in the Python 3.5 trunk(currently in Alpha).

Set Up

  1. Check your system that you have at least Python 2.7.6. This is the minimum version that scandir has been tested on.
  2. Install scandir either thru pip, manually, or use Python 3.5.x

Python 2.7.x:

pip install -r requirements.txt

  1. Once installed run the python script jobsizes.py --root=/path/to/root and other flags

Flags

  • --root=/path/to/sort This is required. The path must be accessible and you must have permissions. That may require you run as super user or equivalent.
  • --sort=[size|name] How the results should be sorted. The default is size. name sort does a case insensitive sort.
  • --filter=regex This allows you to filter the top dirs to be calculated under your root.
  • --output=[terminal]|email This sets the output format. The default format is terminal which is present a tabbed tabular format. Email is present simple list for easier rendering across a variety of email platforms.
  • -d Will enable debug mode. This will tell you if scandir sees its fast c libraries. It will also output as it calculates each directory before final sorted output. This is helpful is you're not sure if it is rendering or where it is taking long. There is currently no timing.

Who do I talk to?

  • Talk to Anthony Scudese

About

jobfoldersizes is a python command line tool that utilizes the scandir python module to calculate the folder sizes of a desired root directory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published