(28, 1, '..\\Streams\\hello-out.py')]
[(2278, 67, '..\\Processes\\multi2.py'),
(2547, 57, '..\\Filetools\\split.py'),
(4361, 105, '..\\Tester\\tester.py')]
By lines...
[(21, 1, '..\\__init__.py'),
(21, 1, '..\\Filetools\\__init__.py'),
(28, 1, '..\\Streams\\hello-out.py')]
[(2547, 57, '..\\Filetools\\split.py'),
(2278, 67, '..\\Processes\\multi2.py'),
(4361, 105, '..\\Tester\\tester.py')]
This script also lets us scan for different file types; here it is picking out the smallest
and largest text file from one level up (at the time I ran this script, at least):
C:\...\PP4E\System\Filetools> bigext-tree.py .. .txt 1
..
..\Environment
..\Filetools
..\Processes
..\Streams
..\Tester
..\Tester\Args
..\Tester\Errors
..\Tester\Inputs
..\Tester\Outputs
..\Tester\Scripts
..\Tester\xxold
..\Threads
By bytes...
[(4, 2, '..\\Streams\\input.txt'),
(13, 1, '..\\Streams\\hello-in.txt'),
(20, 4, '..\\Streams\\data.txt')]
[(104, 4, '..\\Streams\\output.txt'),
(172, 3, '..\\Tester\\xxold\\README.txt.txt'),
(435, 4, '..\\Filetools\\temp.txt')]
By lines...
[(13, 1, '..\\Streams\\hello-in.txt'),
(22, 1, '..\\spam.txt'),
(4, 2, '..\\Streams\\input.txt')]
[(20, 4, '..\\Streams\\data.txt'),
(104, 4, '..\\Streams\\output.txt'),
(435, 4, '..\\Filetools\\temp.txt')]
And now, to search your entire system, simply pass in your machine’s root directory
name (use / instead of C:\ on Unix-like machines), along with an optional file extension
type (.py is just the default now). The winner is...(please, no wagering):
C:\...\PP4E\dev\Examples\PP4E\System\Filetools> bigext-tree.py C:\
C:\
C:\$Recycle.Bin
C:\$Recycle.Bin\S-1-5-21-3951091421-2436271001-910485044-1004
C:\cygwin
278 | Chapter 6: Complete System Programs