File size distribution: Difference between revisions

m
added a ;Task: section header, added whitespace before the table-of-contents (TOC), separated suggestions and a query from the task's requirements..
m (→‎{{header|REXX}}: added commas to allow ginormous numbers to be read easier, add output from a non-typical "data" drive.)
m (added a ;Task: section header, added whitespace before the table-of-contents (TOC), separated suggestions and a query from the task's requirements..)
Line 1:
{{draft task}}File Size Distribution
 
;Task:
Beginning from the current directory, or optionally from a directory specified as a command-line argument, determine how many files there are of various sizes in a directory hierarchy. My suggestion is to sort by logarithmn of file size, since a few bytes here or there, or even a factor of two or three, may not be that significant. Don't forget that empty files may exist, to serve as a marker. Is your file system predominantly devoted to a large number of smaller files, or a smaller number of huge files?
Beginning from the current directory, or optionally from a directory specified as a command-line argument, determine how many files there are of various sizes in a directory hierarchy.
 
 
My suggestion is to sort by logarithmn of file size, since a few bytes here or there, or even a factor of two or three, may not be that significant.
Don't forget that empty files may exist, to serve as a marker.
 
 
Is your file system predominantly devoted to a large number of smaller files, or a smaller number of huge files?
<br><br>
 
=={{header|C}}==