|
Some more tar parameters
You may also want to pay attention to some other parameters of tar. You must include one of these actions:
x=Extract contents
t=List contents
c=Create
Then there is the:
v=verbose which echos the results to the standard output (screen)
If if you specify:
f=file If "f" is specified, the next parameter must be the device or file of the archive. If no "f" is specified, the default device ( sometimes specified in /etc/defaults/tar ) will be used.
So tar -xvf <file> <path/files> or -cvf <file> <path/files> or tar -tvf <file> are the most common.
You may also want to pay attention to the file attributes and how to handle duplicates and paths that do not exist. Each OS may have minor differences so read the man page for that OS.
|