Sponsored Content
Top Forums Shell Programming and Scripting unzip particular gzip files among the normal data files Post 302148151 by porter on Friday 30th of November 2007 03:43:27 AM
Old 11-30-2007
Quote:
Originally Posted by thepurple
Is it possible I can just unzip only GZIP unixtt* files leaving the data unixtt* files.?? What should i need to add in the script ??
Firstly sort out your naming conventions so files that are compressed do have an extension indicating the compression method, eg .Z, .gz etc.

If "file" can tell you what is a gzipped file, then use that to tell you in the script.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Normal user access to files/folders

I was wondering if there is a way to give my regular user on Linux right to the /var/www/html folder and files therin without going into SU mode every time. Thanks. Gregg (1 Reply)
Discussion started by: gdboling
1 Replies

2. Shell Programming and Scripting

How redirect output(error and normal) to 2 different files

Hello, I have a java program which i am calling in shell script. I wanted to redirect output to 2 differetn files. Output should have both 1 & 2 (normal and error) in both file. pls help (2 Replies)
Discussion started by: balareddy
2 Replies

3. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

4. UNIX for Advanced & Expert Users

how to unzip files in different directories

Hi there: Is there any fest way to upzip files that distributed in several directories and their sub-directory instead of unzipping them directory by directory?? Thanks a lot!!! (1 Reply)
Discussion started by: cls3415
1 Replies

5. Shell Programming and Scripting

Unzip .tla files

Hi , I have a file which is with extension .tla. I have no idea what file it is so can anybody let me know what it is?. Regards, Chetan.C (1 Reply)
Discussion started by: chetan.c
1 Replies

6. Shell Programming and Scripting

unzip selected files

Hi, In file zip folder i have many files but i want to extract onlu .LOG file from the zip. How can i achive this Rajesh (3 Replies)
Discussion started by: guddu_12
3 Replies

7. UNIX for Dummies Questions & Answers

Unzip the Files

I have a list of zip files and regular files in a folder /home/data/ Example: PMExtra_A123_ABC_121001020000.zip PMExtra_B596_GRT_121001020000.zip PMExtra_C156_SFD_121001020000.zip PMExtra_S243_KDF_121001020000.xml PMExtra_L234_IDF_121001020000.xml I have to unzip all the .zip... (8 Replies)
Discussion started by: eskay
8 Replies

8. AIX

Moving Hidden files to normal files

I have a bunch of hidden files in a directory in AIX. I would like to move these hidden files as regular files to another directory. Say i have the following files in directory /x .test~1234~567 .report~5678~123 .find~9876~576 i would like to move them to directory /y as test~1234~567... (10 Replies)
Discussion started by: umesh.narain
10 Replies

9. Shell Programming and Scripting

Script to unzip files and Rename the Output-files

Hi all, I have a many folders with zipped files in them. The zipped files are txt files from different folders. The txt files have the same names. If i try to find . -type f -name "*.zip" -exec cp -R {} /myhome/ZIP \; it fails since the ZIP files from different folders have the same names and... (2 Replies)
Discussion started by: pmkenya
2 Replies

10. Shell Programming and Scripting

Unzip all the files with subdirectories present and append a part of string from the main .zip files

Hi frnds, My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on. Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies
GZIP(1) 						    BSD General Commands Manual 						   GZIP(1)

NAME
gzip -- compression/decompression tool using Lempel-Ziv coding (LZ77) SYNOPSIS
gzip [-cdfhlNnqrtVv] [-S suffix] file [file [...]] gunzip [-cfhNqrtVv] [-S suffix] file [file [...]] zcat [-fhV] file [file [...]] DESCRIPTION
The gzip program compresses and decompresses files using Lempel-Ziv coding (LZ77). If no files are specified, gzip will compress from stan- dard input, or decompress to standard output. When in compression mode, each file will be replaced with another file with the suffix, set by the -S suffix option, added, if possible. In decompression mode, each file will be checked for existence, as will the file with the suffix added. If invoked as gunzip then the -d option is enabled. If invoked as zcat or gzcat then both the -c and -d options are enabled. This version of gzip is also capable of decompressing files compressed using compress(1) or bzip2(1). OPTIONS
The following options are available: -1, --fast -2 -3 -4 -5 -6 -7 -8 -9, --best These options change the compression level used, with the -1 option being the fastest, with less compression, and the -9 option being the slowest, with optimal compression. The default compression level is 6. -c, --stdout, --to-stdout This option specifies that output will go to the standard output stream, leaving files intact. -d, --decompress, --uncompress This option selects decompression rather than compression. -f, --force This option turns on force mode. This allows files with multiple links, overwriting of pre-existing files, reading from or writing to a terminal, and when combined with the -c option, allowing non-compressed data to pass through unchanged. -h, --help This option prints a usage summary and exits. -l, --list This option displays information about the file's compressed and uncompressed size, ratio, uncompressed name. With the -v option, it also displays the compression method, CRC, date and time embedded in the file. -N, --name This option causes the stored filename in the input file to be used as the output file. -n, --no-name This option stops the filename and timestamp from being stored in the output file. -q, --quiet With this option, no warnings or errors are printed. -r, --recursive This option is used to gzip the files in a directory tree individually, using the fts(3) library. -S suffix, --suffix suffix This option changes the default suffix from .gz to suffix. -t, --test This option will test compressed files for integrity. -V, --version This option prints the version of the gzip program. -v, --verbose This option turns on verbose mode, which prints the compression ratio for each file compressed. ENVIRONMENT
If the environment variable GZIP is set, it is parsed as a white-space separated list of options handled before any options on the command line. Options on the command line will override anything in GZIP. SEE ALSO
bzip2(1), compress(1), xz(1), fts(3), zlib(3) HISTORY
The gzip program was originally written by Jean-loup Gailly, licensed under the GNU Public Licence. Matthew R. Green wrote a simple front end for NetBSD 1.3 distribution media, based on the freely re-distributable zlib library. It was enhanced to be mostly feature-compatible with the original GNU gzip program for NetBSD 2.0. This manual documents NetBSD gzip version 20040427. AUTHORS
This implementation of gzip was written by Matthew R. Green <mrg@eterna.com.au>. BSD
June 18, 2011 BSD
All times are GMT -4. The time now is 07:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy