Shell Programming Blog Shell Programming Blog

Saturday, 29 September 2012

How to list the empty directories in Linux

Unknown | 22:37 |


 

The find command in Linux has an option called 'empty'. This option can be used to list empty regular files or empty directories.

e.g.

To list all the empty directories

$ find . -type d -empty

Output:

./dir1/praset
./salo/new/data5
./premoc/test1

0 Comments:

   

Post a Comment

Don't just read and walk away, Your Feedback Is Always Appreciated. I will try to reply to your queries as soon as time allows.

Note:
1. If your question is unrelated to this article, please use our Facebook Page.
2. Please always make use of your name in the comment box instead of anonymous so that i can respond to you through your name and don't make use of Names such as "Admin" or "ADMIN" if you want your Comment to be published.
3. Please do not spam, spam comments will be deleted immediately upon my review.

Regards,
Mohamed Abubakar Sittik A

 

Shell Programming Copyright © 2012 Shell Programming theme is Designed by Abusittik, Shell Programming