I copied a large number of files (including directories) and wanted to
see if all the files were copied.
chris@p450:~> find /media/cdrecorder/ | wc -l
2643
chris@p450:~> find /mnt/windows_xp/Documents\ and\
Settings/temp_cd_copy/ | wc -l
2643
chris@p450:~>
2643 files are in each directory tree.
I can exclude, using the not (!) symbol, directories (-type d) to list
the number of files (non-directories) in the directory tree:
chris@p450:~> find /media/cdrecorder/ ! -type d | wc -l
2173
chris@p450:~> find /mnt/windows_xp/Documents\ and\
Settings/temp_cd_copy/ ! -type d | wc -l
2173
chris@p450:~>
I can exclude, using the not (!) symbol, files (-type f) to list the
number of directories in the directory tree:
chris@p450:~> find /media/cdrecorder/ \! -type f | wc -l
470
chris@p450:~> find /mnt/windows_xp/Documents\ and\
Settings/temp_cd_copy/ ! -type f | wc -l
470
chris@p450:~>
2173 files
+470 directories
------
2643 files and directories
Christopher Paulin
_______________________________________________
CCOSS mailing list
ccoss@xxxxxxxxxxxxx
CCOSS mailing list page: http://www.freelists.org/cgi-bin/list?list_id=3594
CCOSS Web page: http://www.ccoss.org