svann wrote:
hello any ideea of a script which can display how many files are into a dir or how many dirs are in /
i whant to check some of my directories to see if the backup match with the current server files any ideea how it can be made? thanks
To check the number of files in one directory you can just simple 'ls /path/to/directory | wc -l'
If you're talking recursively traversing all underlying subdirectories 'find /path/to/directory -type f | wc -l'
You can do the same with directories, just replace '-type f' with '-type d'
You're also talking about checking your backup. Just counting files or directories isn't a very robust way of doing that. Comparing md5 checksums would be a little better 'find /path/to/directory -type f -exec md5sum {} \;'