Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Delete empty file with Max depth 1 i.e. delete only one subdir if its empty

Test with echo
`find /home/ashish/movies -maxdepth 1 -type d -empty -print0|xargs -0 echo rm -rf {} ;`

If Output is right?

`find /home/ashish/movies -maxdepth 1 -type d -empty -print0|xargs -0 -exec rm -rf {} ;`

# Find .gz file under certain directory and delete.
# Find and delete file (linux)

find /var/logs/*/*.gz -print0|xargs -0 -exec echo {} ;
find /var/logs/*/*-2012-08 -maxdepth 1 -type f -empty -print0|xargs -0 -exec echo {} ;