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
Portal
Register
Rules & FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
Delete files with 0kb
View Single Post in UNIX 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