DIDAC Tips & Tricks
- Do not unzip and untar the .tar.gz file in separate
steps because that will require almost twice the diskspace that
is needed when doing it in single steps. Instead use
gzip -dc file.tar.gz | tar tvf -
This will show you all the files in the .tar.gz file.
- If you want to extract all files from the .tar.gz file use
gzip -dc file.tar.gz | tar xf -
Note that this will create a directory with the name of the product set
in the current directory and put all files in that newly created directory.
Apart from that it will also put a file called datalist.txt in
the current directory. This datalist.txt maps the complete name of
the file to the name it has after extracting to disk (and vice versa).
- If you want to extract one file from the .tar.gz file use
gzip -dc file.tar.gz | tar xf - pathname/filename
The pathname and filename should be exactly as given in
the .tar.gz file. If you want more than one file append their
names, again include pathname, at the end of the command.
- In case you have a version of GNU
tar you can simplify
the above commands like this
gtar -ztvf file.tar.gz, to list all files.
gtar -zxf file.tar.gz, to extract all files.
gtar -zxf file.tar.gz pattern, to extract all files that
match pattern.
- When really desperate for diskspace, but having sufficient
bandwidth (sufficient meaning in excess of 20k/s) or plenty of patience
you might want to try
remsh poseidon.sron.rug.nl cat file.tar.gz | gzip -dc | tar xf -
When needed you can replace remsh by rsh. If
you have not set up your .rhosts file properly you'll have
to supply a password. If your username differs on both machines you
also have to inform the remsh of that. In any case, read
the manual pages for remsh or rsh for more
information.
#...#