|Cygwin and Perl Save the Day!
||[Dec. 31st, 2009|10:14 am]
Shlomif's Technical Posts Community
In my house, we have a Windows XP desktop computer that serves the family
(while I'm normally using my Linux desktop machine.). A few days ago my father
complained that drive C:\ there, which contains all the programs is almost
completely occupied, and said we need to remove programs from it. Now this
drive is roughly 45 GB in size, so it seemed unlikely to me that it became
entirely full because of the executables.
I decided to investigate. I switched to my account, started a
and ran \du . > ~/du.txt from the C:\. What du does is report the
size of every directory starting from the input path recursively. Then I
du-output-analyser written in Perl to analyse the results, and eventually
found out that 20,000,000 (20 million) 1 KB blocks are being occupied by a
directory containing photos. Then I sent a report for my father announcing it.
This just goes to show how much people who are not familiar with the UNIX
command line and with programming are missing and are much more helpless
than the more clueful UNIX power-users.