tar command to explore multiple layers of tar and tar.gz files
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 look inside two tar files are once.
The tar file is structured as follows:
So far for code I have:
The first two commands (tar tf and grep) work correctly however I am unable to get the third command to run correctly. It tells me the directory does not exist and I believe this is because tar tf only lists what is inside that directory and therefore after executing the file the first time I lose List_of_tests.tar from the path and the path simply starts with These_are_the_tests/....
Any ideas?
Thanks!
Bashnewbee
Last edited by bashnewbee; 07-12-2011 at 04:21 PM..
Hi All,
There 2 files in the folder /temp/tst/
1.txt
2.txt
When I run the command
find /temp/tst \( -name "*.txt" \) -exec tar cf /temp/123.tar {} \;
it creates the tar file 123.tar with only one file in it and that is 2.txt.But if I use the command
find /temp/tst \( -name "*.txt"... (1 Reply)
Hi All
Can someone pls guide me if there any utility to compress file on windows & uncompress on vxworks
I tried as -
- compressed some folders on windows ... i created .tar ( to maintain directory structure ) and compressed to .gz format.
- on VxWorks i have uncompressed it to .tar... (1 Reply)
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)
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
HI,
if I have a tarfile called pmapdata.tar that contains
tar -tvf pmapdata.tar
-rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt
-rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt
-rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it.
Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem?
tar tvf file1.tar
... (1 Reply)
Coming from this thread, just wondering if there is an option to check if the Tar of the files/directory will be without any file-errors without actually making the tar.
Scenario:
Let's say you have a directory of 20GB, but you don't have the space to make Tar file at the moment, and you want... (14 Replies)
Discussion started by: filosophizer
14 Replies
LEARN ABOUT HPUX
tar
tar(4) Kernel Interfaces Manual tar(4)NAME
tar - format of tar tape archive
DESCRIPTION
The header structure produced by (see tar(1)) is as follows (the array size defined by the constants is shown on the right):
All characters are represented in ASCII. There is no padding used in the header block; all fields are contiguous.
The fields magic, uname, and gname are null-terminated character strings. The fields name, linkname, and prefix are null-terminated char-
acter strings except when all characters in the array contain non-null characters, including the last character. The version field is two
bytes containing the characters (zero-zero). The typeflag contains a single character. All other fields are leading-zero-filled octal
numbers in ASCII. Each numeric field is terminated by one or more space or null characters.
The name and the prefix fields produce the pathname of the file. The hierarchical relationship of the file is retained by specifying the
pathname as a path prefix, with a slash character and filename as the suffix. If the prefix contains non-null characters, prefix, a slash
character, and name are concatenated without modification or addition of new characters to produce a new pathname. In this manner, path-
names of at most 256 characters can be supported. If a pathname does not fit in the space provided, the format-creating utility notifies
the user of the error, and no attempt is made to store any part of the file, header, or data on the medium.
SEE ALSO tar(1)STANDARDS CONFORMANCE tar(4)