LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-30-2003, 09:16 PM   #1
SnowSurfAir
Member
 
Registered: Mar 2003
Distribution: Redhat 9
Posts: 459

Rep: Reputation: 30
How to gzip a file


I need to gzip a image file how do I do that?
 
Old 07-30-2003, 09:52 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
to compress or to uncompress?

gunzip <name of the file>
 
Old 07-30-2003, 09:56 PM   #3
SnowSurfAir
Member
 
Registered: Mar 2003
Distribution: Redhat 9
Posts: 459

Original Poster
Rep: Reputation: 30
compress
 
Old 07-30-2003, 10:04 PM   #4
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
-c --stdout write on standard output, keep original files unchanged
-d --decompress decompress
-f --force force overwrite of output file and compress links
-h --help give this help
-l --list list compressed file contents
-L --license display software license
-n --no-name do not save or restore the original name and time stamp
-N --name save or restore the original name and time stamp
-q --quiet suppress all warnings
-r --recursive operate recursively on directories
-S .suf --suffix .suf use suffix .suf on compressed files
-t --test test compressed file integrity
-v --verbose verbose mode
-V --version display version number
-1 --fast compress faster
-9 --best compress better
--rsyncable Make rsync-friendly archive
file... files to (de)compress. If none given, use standard input.

gzip -1 <name of the file>

I think?
 
Old 07-31-2003, 02:09 AM   #5
shaheen
LQ Newbie
 
Registered: Jul 2003
Location: India
Distribution: Red Hat 7.1
Posts: 27

Rep: Reputation: 15
About compressing a file

What i feel is that you have a file that you need to compress , may be it is a tar file or anything like that , for compressing issue a commnd gzip -9 <filename> .. this option gzips the entire file as a single file with the new name as <filename>.gz .. otherwise if you just want to have the other file intact and subsequently have a compressed one , issue gzip -c <filename> . for unzipping this file issue gunzip <filename> ... ... hope this can help you ..
cheers
Shaheen
 
Old 07-31-2003, 02:09 PM   #6
SnowSurfAir
Member
 
Registered: Mar 2003
Distribution: Redhat 9
Posts: 459

Original Poster
Rep: Reputation: 30
Thanks Megaman X and shaheen
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Solaris 8 gzip issues- cannot gzip -d lynx sixosix Solaris / OpenSolaris 4 03-13-2005 04:17 PM
gzip a directory into a file tcma Linux - Software 4 10-07-2004 03:51 AM
untar gzip file problem jmr0311 Linux - General 8 09-12-2004 05:32 PM
linux gzip file by date antonioxcom Linux - Newbie 4 07-12-2004 01:07 AM
how to decompress gzip file with extension .cif? priya Linux - Software 1 09-05-2003 02:49 PM


All times are GMT -5. The time now is 02:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration