![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to delete files with certain ext? | tonyvirk | UNIX for Dummies Questions & Answers | 4 | 12-09-2007 11:57 AM |
| How to delete files ?? | preethgideon | UNIX for Dummies Questions & Answers | 5 | 10-29-2007 12:51 AM |
| how to delete log files | castlerock | Shell Programming and Scripting | 2 | 03-29-2006 12:42 PM |
| when I try to run rm on multiple files I have problem to delete files with space | umen | UNIX for Dummies Questions & Answers | 1 | 09-20-2005 12:20 AM |
| I can't delete some files | DISTURBED | UNIX for Dummies Questions & Answers | 4 | 08-01-2002 08:15 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Delete files with 0kb
Hi, i need to strip out a logfile dir, but only remove the files with 0kb . How would i go about doing this?
TIA |
| Forum Sponsor | ||
|
|
|
|||
|
ls -l|while read line
do awk '$5 != 0 {print $0}' done>file1 $5 is the fifth field in output of ls - l which gives the no. of characters in the file. so i hv written all the files which dont hv zero characters (or bytes) to file1 |
| Thread Tools | |
| Display Modes | |
|
|