Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Script to count number of files in directories

$
0
0
Hi All!

I would like to have a script that will count the number of files at the top of the hour of soome directories and mail the results to me.
I was thinking on :

Code:

a=`/directory/subdirectory/ | wc -l`
echo "/directory/subdirectory :$a"
b=`/another_dir/subdir/ | wc -l`
echo "/another_dir/subdir :$b"

I need to have a
Code:

while
, and I would like to have this results every hour of everyday.

Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images