Anmelden Seite Diskussion Versionen Go to the site toolbox

Shell command for recursive file count in folders

Aus CrazyLinux

See below for a great shell command to get a listing of the count of files in all the folders in the current directory and below. It will produce an output similar to the following which can then be manipulated in a data-processing application:


1 ./example/dir1
256./example/dir2
3 ./example/dir3/dir4/dir5
10 ./example/dir3/dir4/dir6
67 ./example/dir3/dir4/dir7


Command:

find . -type f -printf %h"\n" | sort | uniq -c


found on http://boshdirect.com/blogs/tech/shell-command-for-recursive-file-count-in-folders.html

Site Toolbox:

Meine Werkzeuge
Creative Commons-Lizenz
Diese Seite wurde zuletzt am 25. Juli 2010 um 14:05 Uhr geändert. - Diese Seite wurde bisher 76-mal abgerufen. - Impressum - Über CrazyLinux
Bienenwachskerzen Baumkerzenhalter