08-28-2008
Should work without any modification. At least here, zgrep doesn't complain if you give it files which are not gzipped (although restricting to -name '*.gz' might be a good idea for performance reasons).
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
can i use the tar command to copy an entire directory and its content in another folder?
What is the proper syntax?
thx (2 Replies)
Discussion started by: tomapam
2 Replies
2. Solaris
I've backed up several files to tape using tar, and wish to list those that have backed up.
% tar cvf /dev/rmt/2un /s_1/oradata/pgpub/config.ora
a /s_1/oradata/pgpub/config.ora 2 tape blocks
But when I go to list the files:
% tar tvf /dev/rmt/2un
tar: tape read error
What am I... (3 Replies)
Discussion started by: FredSmith
3 Replies
3. UNIX for Advanced & Expert Users
Hi,
On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files.
a) /usr/users/oracle/bin
b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies
4. UNIX for Advanced & Expert Users
I am trying to grab a folder and all the folders and files underneath it and send it from one computer to another. I basically want to compress the whole folder into a tar, tgz, or zip file so that it can be sent as one file. is there a command to compress a folder and all its contents into a tar... (7 Replies)
Discussion started by: kane4355
7 Replies
5. Shell Programming and Scripting
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies
6. Shell Programming and Scripting
I have a tar file that contains multiple .Z files. Hence I need to issue a tar command followed by a gzip command to fully extract the files. How do I do it in a single command?
What I'm doing now is
tar xvf a.tar (this will output 1.Z and 2.Z)
gzip -d *.Z (to extract 1.Z and 2.Z) (9 Replies)
Discussion started by: ericlim
9 Replies
7. UNIX for Dummies Questions & Answers
Linux RHEL 5.4
It is easy to create a tarball when you have files same extension
For eg:
You want to tar all files with the extension .log . This is easy
tar -cvf diagnose.tar *.log
I have two files with different extensions .log and .sh :
error.log
myscript.sh
I want to create a... (5 Replies)
Discussion started by: John K
5 Replies
8. Solaris
Hi,
I am using solaris 10 OS.Please help me out with the commands needed in below two scenarios.
1)How to delete the existing files in the tar file.
suppose i have a main tarfile named application.tar and it contains a file called ingres.tar.
what is the command to remove ingres.tar... (2 Replies)
Discussion started by: muraliinfy04
2 Replies
9. UNIX for Dummies Questions & Answers
I am just creating tar.gz file with comand tar -zcvf xyz.tar.gz /home/xyz/*
xyz folder contains thousands of files mostly .c, .cpp, etc..
I see that many times all the files are not zipped.
Many files(in hundreds) are abruptly left out.
What may be the reason for this and how to resolve... (10 Replies)
Discussion started by: rupeshkp728
10 Replies
10. Shell Programming and Scripting
I need to backup my database but the files are very large and the TAR command will not let me. I searched aids and found that I could do something with the mknod, COMPRESS and TAR command using them together. I appreciate your help. (10 Replies)
Discussion started by: frizcala
10 Replies
ha(1) HA archiver ha(1)
NAME
ha - a small file archiver utility
SYNOPSIS
ha <command>[<option><option>...] archive [ name ... ]
DESCRIPTION
After the program name comes a command name (single letter) and options (single letters, appended to the command name without a space).
COMMANDS
a[sdqemr012]
Add files matching search pattern to archive.
e[aqty]
Extract files matching search pattern from archive.
x[aqty]
Extract files matching search pattern from archive using path information stored in archive.
l[f] List files currently in archive.
d[q] Delete files matching search pattern from archive. If archive does not contain any files after deletion it is removed.
f[sdqemr012]
Freshen files in archive. All files matching search pattern and newer than version already in archive are updated to archive.
u[sdqemr012]
Update files to archive. All files matching search pattern that are newer than version already in archive or are not yet in archive
are updated to archive.
t[q] Test files in archive.
OPTIONS
0,1,2 Try compression method #. More than one can be specified.
Methods are:
0-CPY Simple copying of files.
1-ASC Default method using sliding window dictionary followed by arithmetic
coder. Offers quite good compression on wide variety of file types.
2-HSC Compression method based on finite context model and arithmetic
coder. Quite slow for binary data, but offers very good compression
especially for longer text files.
y Assume answer yes on all questions.
t Touch files when extracting. Sets file times to current machine time.
r Recurse through subdirectories while searching for files matching search pattern.
f Full listing of stored file information.
m Move files when archiving. Files are removed from disk after they are successfully written to archive.
a Set system specific file attributes when extracting files.
s Find special files when archiving.
e Do not store pathname information.
q Quiet operation.
d Make separate entries for directories. Saves information about empty directories, directory attributes etc. in archive.
AUTHOR
This manual page was written by Mikhail Gusarov <dottedmag@dottedmag.net> for Debian GNU/Linux system (but may be used by others).
ha 0.999p 3 Jul 2008 ha(1)