Computing.Net > Forums > Unix > Zipping only unzipped files

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.

Zipping only unzipped files

Reply to Message Icon

Name: anilcgowda
Date: September 26, 2005 at 11:49:30 Pacific
OS: UNIX
CPU/Ram: 1GB
Comment:

Hi,

Can anybody let me know how to zip only unzipped files in a directory.
I have a directory in which there are both zipped and unzipped files. I want to pick up only unzipped files and then zip them.
Something like
if [ file is unzipped ]
then
gzip filename
fi.

Thanks,
Anil



Sponsored Link
Ads by Google

Response Number 1
Name: vicchai
Date: September 27, 2005 at 22:57:41 Pacific
Reply:

Just zip all the files in that directory, those file already ziped nothing happen, those file not zip will zip up now.

cd /directory
gzip -9 *


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Zipping only unzipped files

Zip-Files www.computing.net/answers/unix/zipfiles/3141.html

Check gz zip files when corruption www.computing.net/answers/unix/check-gz-zip-files-when-corruption/7963.html

how to unzip and find a file? www.computing.net/answers/unix/how-to-unzip-and-find-a-file/8343.html