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-ddhh:mm:sssizepathname
where:
is the date and time when the file
was last modified.
yyyy-mm-dd hh:mm:ss
is the size of the file in bytes.
size
is the path name of the file,
relative to the starting directory
that was named on the command line.
pathname
So, for example, if you used this command:
bigfiles /u/guykay
then if a pathname appears in the report as
“bin/sarantium/crispin”, that file's actual pathname is
“/u/guykay/bin/sarantium/crispin”.