![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Removing empty folders using 'find' | deTTo | UNIX for Dummies Questions & Answers | 5 | 04-21-2008 10:24 PM |
| Removing empty folders using the "find" command | biot | UNIX for Dummies Questions & Answers | 3 | 03-25-2008 10:43 PM |
| how to find empty folders without using -empty | lasse | UNIX for Dummies Questions & Answers | 7 | 01-17-2008 02:30 AM |
| zip nesting empty folders | groundlevel | UNIX for Dummies Questions & Answers | 0 | 09-29-2006 12:08 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
don't get a file name like that using ls -1 and print column 9. if you have spaces in the file name , you will not get the correct file name. Use find instead, then something to count inside each directory. Pseudocode Code:
find . -type d | while read DIR do var=`ls $DIR | wc -l ` if var is 0 then echo "empty" fi done |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|