Re: checking gzip files
- From: fxn@xxxxxxxxxxx (Xavier Noria)
- Date: Fri, 30 Dec 2005 20:34:15 +0100
On Dec 30, 2005, at 13:14, S Khadar wrote:
Hi all,
I have a 15 thousand directories - each of them contain say 10 files (all
*.gzip)
out of this 10 *.gz files - I want to check whether a file named foo.gz
contain any content or not - since my files are gzipped even the blank file
occupies some size.
Even if gzipped files have always more than 0 bytes, wouldn't it be true than all empty gzipped files have the same size, and that non- empty gzipped files are greater than that minimum? In this Mac that size seems to be 24 bytes.
If that was the case you could use a regular -s instead of that z* trickery, which multiplied by thousands of directories will make a difference.
-- fxn
% touch foo % ls -l foo -rw-r--r-- 1 fxn staff 0 Dec 30 20:26 foo % gzip foo % ls -l foo.gz -rw-r--r-- 1 fxn staff 24 Dec 30 20:26 foo.gz % echo x > bar % ls -l bar -rw-r--r-- 1 fxn staff 2 Dec 30 20:27 bar % gzip bar % ls -l bar.gz -rw-r--r-- 1 fxn staff 26 Dec 30 20:27 bar.gz
.
- Follow-Ups:
- Re: checking gzip files
- From: Adriano Ferreira
- Re: checking gzip files
- References:
- Fwd: checking gzip files
- From: S Khadar
- Fwd: checking gzip files
- Prev by Date: Re: A "sub" question...
- Next by Date: Use of uninitialized value Error
- Previous by thread: Re: checking gzip files
- Next by thread: Re: checking gzip files
- Index(es):
Relevant Pages
|