![]() |
|
|
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 |
| Deleting from Mac on GUI? | wmosley2 | OS X (Apple) | 1 | 12-10-2003 11:06 PM |
| Deleting by ID | boyler | Shell Programming and Scripting | 1 | 09-23-2003 11:37 PM |
| Printing Problems in unix ... ( Bar-cdoe - Ip Printing) | QuickSilver | UNIX for Advanced & Expert Users | 3 | 06-04-2002 11:48 AM |
| deleting lines | supercbw | High Level Programming | 1 | 05-06-2002 01:53 PM |
| usb - deleting (irq) | termiEEE | UNIX for Dummies Questions & Answers | 1 | 04-18-2002 06:56 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I am trying to print and delete at the same time 0KB files... using following command
a-> find . -type f | xargs ls -l | awk '{ if($5 == 0) {print $0;}}' | xargs rm $0 but am not successful. Can somebody tell me how to do this ... same time I need files to be printed as well deleted later. I used tee command as well like this b-> ListFilesZKB | tee | xargs rm $0 where ListFilesZKB is shell script for (a) excluding last pipe. |
|
||||
|
Something is not right, zaxxon's example is correct, based on what you asked. What output does this produce? Code:
find . -size 0 -exec ls - l {} \;
Does it find zero-length files or not? If not try changing -size 0 to -size -1 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|