Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
How to know when a file is empty...
Name: JayF Date: September 22, 2005 at 18:53:04 Pacific OS: XP Pro/Gentoo CPU/Ram: 2500+/256Mb
Comment:
Hi all,
I've been reading quite a bit and have still only found one way of knowing when a file is empty. It's a question one of my teacher asked : find two ways to know a file is empty.
So far I've come up with one,
ls --size if it's 0 in block then it's empty right?
I can't think of another though, beside opening it to check which would be cheesy and doesn't seems like the kind of answer he would like ;)
Name: JayF Date: September 22, 2005 at 19:22:12 Pacific
Reply:
mmmh well further experiment brought files sizes up with the command ls followed with various attributes so I guess I got two different ways of knowing if a file size is 0. I feel like I'm missing something here somehow, that question seem too easy.
0
Response Number 2
Name: Dlonra Date: September 23, 2005 at 06:34:00 Pacific
Summary: I'm a Unix newb here, I have an assignment due soon and I have to know how to go through a file line by line to get it done. Now I think I have most of it done, I cat the file out, then pipe it to cu...
Summary: hi frnds, i have a dual boot system with redhat linux8.0 and win98. i can able to word files in linux. but how to open pdf files which r in windows partition. is there any tool have to download for t...
Summary: apache on a rh9 install should come ready to work. you probably only need to put files in the appropriate dir. you should check though that your machine running RH is actually publicly viewable (does...