reverse find operation

5 views
Skip to first unread message

vijay...@gmail.com

unread,
Feb 5, 2009, 8:16:04 PM2/5/09
to linuxtalks
Hi,

I am having lot of test directories under which the log files reside.
Some times the log files are not created because of the setup issues
but the directory would be created.
I would like to find out the directory/testname which does not have
the log files.
Do we have a specific command in Linux ?

I know this can be done by using a script, but interested in the one
line command.

I have tried to do lot of iterations but didn't get the actual things.

Can we call find within the find operation like, find . -type d -name
"dirName" -exec find {}\; ! \( -name "logfileName" \)



Thanks,
Vijay Gampa

iskende...@gmail.com

unread,
Feb 9, 2009, 12:22:31 PM2/9/09
to linuxtalks
Find empty directory
* http://www.cyberciti.biz/faq/linux-unix-shell-check-if-directory-empty/

Also remove all empty directory
* find -depth -type d -empty -exec rmdir {} \;

Find command manual
* http://linux.about.com/od/commands/l/blcmdl1_find.htm


On Feb 6, 3:16 am, "vijay.ga...@gmail.com" <vijay.ga...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages