Sponsored Content
Full Discussion: Command to compress a file
Operating Systems Linux Red Hat Command to compress a file Post 302925890 by Maddy123 on Thursday 20th of November 2014 01:31:56 AM
Old 11-20-2014
Command to compress a file

Hi,

When we want to compress a file which is of huge size then what command is best for us.Kindly suggest on this.

1.Tar command or
2.gzip command

OS -- Linux 2.6

Regards,
Maddy
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cpio command with compress

Hi friends.. I want to be able to copy a file from one location to another (locally). The location the files are copied to should have compressed instances of the files they were copied from. copy from /home/user/test.file copy to /backup/user/test.file.Z I need to be able to do this... (1 Reply)
Discussion started by: sureshy
1 Replies

2. UNIX for Dummies Questions & Answers

tar command with compress option...

Hi ! i have to write a script that archivs homes not used since 3 years. First, my script gathers the users that are concerned, using the following command : ll -lt /home/*/.sh_history | egrep '2000|1999|1998|1997' | awk '{print $3}' i obtain a list like this : user_1 user_2 ...... (3 Replies)
Discussion started by: tomapam
3 Replies

3. SCO

Help on compress command

Hello. Can any1 help me with the compress command. The -b option takes the number of bits used for encoding. can u expalin why this number of bits is used and for what purpose. what is the maximum number we can provide? In SFU these number has a valod range between 12 and 16 y?? (1 Reply)
Discussion started by: rahulrathod
1 Replies

4. Linux

lp command with compress mode

I want to know whether lp command is having option for setting compess mode in linux.Is it possible to pass escape characters to lp command to set printing in compress mode. (3 Replies)
Discussion started by: zita
3 Replies

5. UNIX for Dummies Questions & Answers

Compress command

compress /var/opt/l2/amer/art2/USFINUM0200_.CSV compress /var/opt/l2/amer/art2/USFINUM200_.CSV compress /var/opt/l2/amer/art2/USFINUM020_.CSV compress /var/opt/l2/amer/art2/USFINUM20_.CSV Is there a way to shorten this or write it in a script. The file to be compressed will be USFINUM but... (5 Replies)
Discussion started by: indira
5 Replies

6. Shell Programming and Scripting

combining mv and compress command

Hi All, I have a file in DirA/ABC.out a need to move to DirB.I am using the following steps now: mv DirA/ABC.out DirB compress -f DirB/ABC.out Is there a way to just do this one step as I have to move hundreds of files every hour. -Thanks in advance. (4 Replies)
Discussion started by: sam_78_nyc
4 Replies

7. UNIX for Dummies Questions & Answers

Copy Compress as one command

Hi, I need to copy and compress files in a directory in single line of command. I am able to copy and gzip files in one command but not directory. Command that I am using for copying directory is below : cp -rp /u01/app/<directory> /u01/app/backup |gzip -r /u01/app/backup/<directory> ... (10 Replies)
Discussion started by: findprakash
10 Replies

8. UNIX for Dummies Questions & Answers

Issue: Compress in unix server and FTP to windows and open the compress file using Winzip

Hi All ! We have to compress a big data file in unix server and transfer it to windows and uncompress it using winzip in windows. I have used the utility ZIP like the below. zip -e <newfilename> df2_test_extract.dat but when I compress files greater than 4 gb using zip utility, it... (4 Replies)
Discussion started by: sakthifire
4 Replies

9. UNIX for Dummies Questions & Answers

Compress the file using Tar command

Hi, When i am tar the file particular ,csv file format in a folder i am receiving the error Command: tar cf New_data.tar /new/file/mari/getdata/small/*.xml Arguements too long But sometimes i am able to compress other folder but the tar folder contains all the file format and... (10 Replies)
Discussion started by: marivinay
10 Replies

10. Red Hat

Does RHEL 5 provide a command to collect RHEL system log in single compress file?

Hi, I heard a command that can collect all RHEL 5 log in a single compress file before I forget. Does any body know...What the command is ? Thanks. (4 Replies)
Discussion started by: nnnnnnine
4 Replies
GZNEW(1)						      General Commands Manual							  GZNEW(1)

NAME
gznew - recompress .Z files to .gz files SYNOPSIS
gznew [ -ftv9PK] [ name.Z ... ] DESCRIPTION
gznew recompresses files from .Z (compress) format to .gz (gzip) format. If you want to recompress a file already in gzip format, rename the file to force a .Z extension then apply gznew. OPTIONS
-f Force recompression from .Z to .gz format even if a .gz file already exists. -t Tests the new files before deleting originals. -v Verbose. Display the name and percentage reduction for each file compressed. -9 Use the slowest compression method (optimal compression). -P Use pipes for the conversion to reduce disk space usage. -K Keep a .Z file when it is smaller than the .gz file SEE ALSO
gzip(1), gzmore(1), gzdiff(1), gzgrep(1), gzforce(1), gzexe(1), compress(1) BUGS
gznew does not maintain the time stamp with the -P option if cpmod(1) is not available and touch(1) does not support the -r option. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWgzip | +--------------------+-----------------+ |Interface Stability | External | +--------------------+-----------------+ NOTES
Source for gzip is available in the SUNWgzipS package. GZNEW(1)
All times are GMT -4. The time now is 04:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy