Sponsored Content
Full Discussion: Command to compress a file
Operating Systems Linux Red Hat Command to compress a file Post 302925924 by MadeInGermany on Thursday 20th of November 2014 08:32:52 AM
Old 11-20-2014
For just one file we do not need an archive (tar = tape archive).
Go for gzip! (To be unpacked with gunzip)
Alternative: bzip2 (Better compression but much longer compression time. To be unpacked with bunzip2)
 

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
mt-dds(1)						      General Commands Manual							 mt-dds(1)

NAME
mt-dds - tool to control a dds device. SYNOPSIS
mt-dds comp-on|comp-off|comp-query|comp-log mt-dds < tell|label > [ -b # ] DESCRIPTION
mt-dds controls the compression mode of dds tape devices (DAT). mt-dds may also report the current tape position in absolute records (relative to begin of tape) in a format that may be used later by dds2tar(1) to access tar archives that are not the first file on tape. The default device is /dev/nst0, which may be overridden with the environment variable TAPE, which in turn may be overridden with the -f device option. The device must be a character special file. OPTIONS
DDS tape device control options comp-on Enable the hardware compression mode if supported by the device. comp-off Disable the compression mode, switch to normal mode. comp-query Print to stderr if compression mode currently is disabled or enabled. A 0 means compression is disabled, a 1 means compression in enabled. comp-log Print to stdout four lines of information about transferred kilobytes before and after hardware compression from and to the device since initialization. dds2tar service functions tell Print three lines with the current tape position, a block size value (20 by default, may be overridden with -b option) and a block length value (blocksize*512) to stdout. If this output is redirected to a location file locfile, this file may be used by dds2tar(1) to access archives on tape. label If the current tape position is the beginning of an archive and the archive is labeled, mt-dds writes the label to stdout and moves the tape back to the current position (or back over the filemark). ts If the current tape position is the beginning of an archive and the archive is labeled, mt-dds writes the timestamp in octal format to stdout and moves the tape back to the current position (or back over the filemark). If you are using only one computer, the timestamp can be used as a unique archive identifier. -b # Specify the block size # value that is used as a default for the written value with the mt-dds tell command (see above). Also the internal buffer size is specified with this option which is used to read one block in order to get the block size of the current tape block. So specify the block size of the archive or a larger number. other options -f device Device of the tape archive (default is /dev/nst0). Must be a character special file connected to a dds tape device. -V,--version Print the version number of mt-dds to stderr and exit immediately. --help print some screens of online help with examples through a pager and exit immediately. EXAMPLES
Example 1: checking the compression mode of the default tape device mt-dds comp-query Example 2: Write the location information as dds2tar command line options to stdout. mt-dds ENVIRONMENT
The environment variable TAPE overrides the default tape device /dev/nst0. PAGER The environment variable PAGER overrides the builtin pager command ("/bin/more") to display the output of the --help option. SEE ALSO
dds2tar(1), dds2index(1), mt(1), tar(1) HISTORY
This program was created to use it in conjunction with dds2tar. AUTHOR
J"org Weule (weule@cs.uni-duesseldorf.de), Phone +49 211 751409. This software is available at ftp.uni-duesseldorf.de:/pub/unix/apollo 2.4 mt-dds(1)
All times are GMT -4. The time now is 01:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy