[ccoss] Re: seeing how many files are in a directory tree -- a solution
- From: Bill <rivetwa@xxxxxxxxxxxxxx>
- To: ccoss@xxxxxxxxxxxxx
- Date: Thu, 27 Nov 2003 19:30:01 -0500
Something I like to do in these cases is:
find src/path -type f -exec md5sum {} \; > src.md5sum
find dest/path -type f -exec md5sum {} \; > dest.md5sum
diff src.md5sum dest.md5sum
This way, especially when a particular OS which is prone to setting a
destination file name and size before all the actual data is copied, I
will know right away which files were in fact successfully copied...
Christopher Paulin wrote:
>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
>
>
>
_______________________________________________
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
- Follow-Ups:
- [ccoss] Re: seeing how many files are in a directory tree --a solution
- From: Christopher Paulin
- References:
- [ccoss] seeing how many files are in a directory tree -- a solution
- From: Christopher Paulin
Other related posts:
- » [ccoss] seeing how many files are in a directory tree -- a solution
- » [ccoss] Re: seeing how many files are in a directory tree -- a solution
- » [ccoss] Re: seeing how many files are in a directory tree --a solution
- » [ccoss] Re: seeing how many files are in a directory tree --a solution
- » [ccoss] Re: seeing how many files are in a directory tree --a solution
- » [ccoss] Re: seeing how many files are in a directory tree --a solution
- » [ccoss] Re: seeing how many files are in a directory tree --a solution
- [ccoss] Re: seeing how many files are in a directory tree --a solution
- From: Christopher Paulin
- [ccoss] seeing how many files are in a directory tree -- a solution
- From: Christopher Paulin