The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Delete files with 0kb
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Delete files with 0kb
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
10-23-2006
napolayan
Registered User
Join Date: Oct 2006
Location: Bangalore, India
Posts: 41
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
napolayan
View Public Profile
Find all posts by napolayan
Find napolayan's past nominations received
Find napolayan's present nominations given