Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Count number of compressed files in a tar.gz archive Post 302344422 by Corona688 on Sunday 16th of August 2009 02:49:26 PM
Old 08-16-2009
Quote:
Originally Posted by methyl
Nobody's mentioned the O/S or how the data was compressed.
The OS probably isn't important in this case since nonportable flags like -z haven't been suggested. And given the gz, it's safe to assume the compressor was gzip.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tar archive with .Z files

Hello, I have a tar archive full of compressed .Z (compressed with the compress command) files. I have restored the tar to a disk but am looking for a way to uncompress every file in every sub-directory. Under normal circumstances, I would just change directories and "uncompress *" but with 1600... (3 Replies)
Discussion started by: Kun2112
3 Replies

2. UNIX for Advanced & Expert Users

deleting files after the creation of a tar archive

Hi, I would modify to delete the files after creating the tar archive. How I can modify the following command: tar -cvvf logswitch.tar `find *.log* -mtime +5` It create a tar with files that are older than 5 days. (5 Replies)
Discussion started by: Minguccio75
5 Replies

3. UNIX for Dummies Questions & Answers

diff on compressed files with tar.gz ext

how can I find out what is the difference between two tar.gz files without uncompressing them. thank you. (7 Replies)
Discussion started by: rakeshou
7 Replies

4. UNIX for Dummies Questions & Answers

tar archive with including specific patern files

Hi, I need to create recursive tar archive, while I put there only files of type a*.txt. Without file filtering the command is: tar cfzf test.tar.gz test_tar/ How I include the switch for including only files with pattern a*.txt ? Thanks a lot! (1 Reply)
Discussion started by: john.gelburg
1 Replies

5. UNIX and Linux Applications

Update compressed archive (TAR)

Is it possible to update a file in a compressed archive.tgz using the tar app without uncompressing/extracting, update and compressing/creating ? tar -uvzf archive.tgz ./file.txt tar: Cannot update compressed archives Try `tar --help' for more information. (1 Reply)
Discussion started by: brendan76
1 Replies

6. UNIX for Dummies Questions & Answers

Files count mismatch when used with Tar with find

Hi I have used the below steps and found some discrepancies step 1 : find ./ -type f -mtime +7 -name "*.00*" | wc -l = 13519 ( total files ) ( the size of this files is appx : 10GB ) step 2: find ./ -type f -mtime +7 -name "*.00*" | xargs tar zcvf Archieve_7.tar.gz step... (7 Replies)
Discussion started by: rakeshkumar
7 Replies

7. Shell Programming and Scripting

How to count number of files in directory and write to new file with number of files and their name?

Hi! I just want to count number of files in a directory, and write to new text file, with number of files and their name output should look like this,, assume that below one is a new file created by script Number of files in directory = 25 1. a.txt 2. abc.txt 3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies

8. UNIX for Dummies Questions & Answers

Remove files from tar archive which are more than 1000 days old.

I am not able to extract/remove files older than 1000 days from a tar archive in linux system. #!/usr/bin/perl @file_list = `find /home/x/tmp/ -name *xxMsg* -ctime +7`; $file_name = '/home/x/tmp/new_archive.tar'; for... (1 Reply)
Discussion started by: DannyV
1 Replies

9. UNIX for Dummies Questions & Answers

Help with number of files in a tar archive

I cant seem to work out how to count the number of executable files in a particular tar archive? Only in a directory as a whole. I also cant work out how to count number of certain file types in a tar archive. Only the directory, pretty stuck :( (9 Replies)
Discussion started by: Razor147
9 Replies

10. UNIX for Advanced & Expert Users

How to download compressed archive zips in bulky automatically using wget?

How to download in bulky compressed (zip, 7z, bzip, xz, etc) archive files from a repository automatically by use of wget ? (3 Replies)
Discussion started by: abdulbadii
3 Replies
ZMORE(1)						    BSD General Commands Manual 						  ZMORE(1)

NAME
zmore, zless -- view compressed files SYNOPSIS
zmore [flags] [file ...] zless [flags] [file ...] DESCRIPTION
zmore is a filter that allows the viewing of files compressed with Lempel-Ziv encoding. Such files generally have a ``Z'' or ``gz'' exten- sion (both the compress(1) and gzip(1) formats are supported). Any flags that are specified are passed to the user's preferred PAGER (which is /usr/bin/more by default). zless is equivalent to zmore but uses less(1) as a pager instead of more(1). When multiple files are specified, zmore will pause at the end of each file and present the following prompt to the user: prev_file (END) - Next: next_file Where prev_file is the file that was just displayed and next_file is the next file to be displayed. The following keys are recognized at the prompt: e or q quit zmore. s skip the next file (or exit if the next file is the last). If no files are specified, zmore will read from the standard input. In this mode zmore will assume gzip(1) style compression since there is no suffix on which to make a decision. ENVIRONMENT
PAGER Program used to display files. If unset, /usr/bin/more is used (zmore) or /usr/bin/less (zless). SEE ALSO
compress(1), less(1), more(1) BSD
October 22, 2014 BSD
All times are GMT -4. The time now is 10:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy