I developed following script and used it :
---
[root@vijay log]# cat ./find_large_small_files.sh
#!/bin/bash
find . -type d -exec ls -ld {} \; &> ./tmpfile
let i=0
for i in `cat ./tmpfile`
do
echo "Directory $i has following no of files : `ls -al $i|wc -l`"
done
Try and modify as per your need.
---
[root@vijay log]# cat ./find_large_small_files.sh
#!/bin/bash
find . -type d -exec ls -ld {} \; &> ./tmpfile
let i=0
for i in `cat ./tmpfile`
do
echo "Directory $i has following no of files : `ls -al $i|wc -l`"
done
Try and modify as per your need.
No comments:
Post a Comment