aman_greval
asked on
Reading contents of Rel223_NIMS_ASC_PLSQL_20061121_01.tar file
I have a tar file: Rel223_NIMS_ASC_PLSQL_2006 1121_01.ta r.gz
I uncompressed the file with:
gunzip Rel223_NIMS_ASC_PLSQL_2006 1121_01.ta r.gz
and it became Rel223_NIMS_ASC_PLSQL_2006 1121_01.ta r
Now i used
tar -xvf Rel223_NIMS_ASC_PLSQL_2006 1121_01.ta r
and unix showed me contents of the above file
$ tar -xvf Rel223_NIMS_ASC_PLSQL_2006 1121_01.ta r
x del_20061121_01, 0 bytes, 0 tape blocks
x del_20061121_01/plsql, 0 bytes, 0 tape blocks
x del_20061121_01/plsql/1_co nk_prod_ST .sql, 97337 bytes, 191 tape blocks
x del_20061121_01/plsql/inst all_nims20 061121_01. ksh, 827 bytes, 2 tape blocks
x del_20061121_01/plsql/inst all_nims20 061121_01. sql, 594 bytes, 2 tape blocks
x del_20061121_01/docs, 0 bytes, 0 tape blocks
x del_20061121_01/docs/Rel22 3_NIMS_ASC _PLSQL_200 61121_01_i 10.doc, 58880 bytes, 115 tape blocks
All these files are shell, pl/sql files.
I want to read the induvidual files. i.e. i want to read the contents of
del_20061121_01/plsql/inst all_nims20 061121_01. sql etc
how can i do this.
I uncompressed the file with:
gunzip Rel223_NIMS_ASC_PLSQL_2006
and it became Rel223_NIMS_ASC_PLSQL_2006
Now i used
tar -xvf Rel223_NIMS_ASC_PLSQL_2006
and unix showed me contents of the above file
$ tar -xvf Rel223_NIMS_ASC_PLSQL_2006
x del_20061121_01, 0 bytes, 0 tape blocks
x del_20061121_01/plsql, 0 bytes, 0 tape blocks
x del_20061121_01/plsql/1_co
x del_20061121_01/plsql/inst
x del_20061121_01/plsql/inst
x del_20061121_01/docs, 0 bytes, 0 tape blocks
x del_20061121_01/docs/Rel22
All these files are shell, pl/sql files.
I want to read the induvidual files. i.e. i want to read the contents of
del_20061121_01/plsql/inst
how can i do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The - in conjunction with the tar -f flag means that the "file" tar is reading from is stdin.
This is useful to pipe tar output to the tar command.
In your original post, you uncompressed the tar file. There's no need to do that if you do
gzip -dc file.tar.gz | tar xvf -
or if you have a Linux system or system where tar recognises the -z flag, you can simply do
tar zxvf file.tar.gz
This is useful to pipe tar output to the tar command.
In your original post, you uncompressed the tar file. There's no need to do that if you do
gzip -dc file.tar.gz | tar xvf -
or if you have a Linux system or system where tar recognises the -z flag, you can simply do
tar zxvf file.tar.gz
ASKER
Thanks for your help Tintin!!
ASKER
why this dash here; i did it without it