Next / Previous / Contents / Shipman's homepage

3. bigfiles.py: Where are my biggest files?

The first application for the PathInfo object is in the bigfiles.py script, which shows you all the files in some directory or directories, sorted in descending order by size.

Here is the general form for the command line invocation of this script:

bigfiles.py [dir ...]

The script takes as arguments zero or more pathnames of directories. For each argument, it produces a report listing all the ordinary files (not directories or soft links) in that directory tree. If you don't give it any directory names, it writes a report on ".", the current working directory.

Each report starts off with a line showing the actual absolute path to the selected directory.

Each line of the report has this format:

yyyy-mm-dd hh:mm:ss  size  pathname

where: