Operating System - Tru64 Unix
1819805 Members
2904 Online
109607 Solutions
New Discussion юеВ

tar cfv, rvf, tvf and xvf

 
Fauziah Mahdan
Super Advisor

tar cfv, rvf, tvf and xvf

Hi all need to know about tar command.
1) The tar command should come with (minus) - or not?
tar -cfv /dev/rmt/xm /filepath
or
tar cfv /dev/rmt/xm /filepath

I am using with minus option all the while.

2)If to list out the tape from tar command into file is it using below command?
tar -tvf /dev/rmt/xm >/tmp/backup_list.txt

To restore the file is it below command?
tar -xvf /dev/rmt/xm /filepath



3 REPLIES 3
Rob Leadbeater
Honored Contributor

Re: tar cfv, rvf, tvf and xvf

Hi,

Reading manuals is usually quite enlightening.

# man tar

Cheers,

Rob
Dennis Handly
Acclaimed Contributor

Re: tar cfv, rvf, tvf and xvf

Here is the HP-UX man page:
http://docs.hp.com/en/B2355-60130/tar.1.html

>1) The tar command should come with (minus) or not?

Either. I use "-". You also have the order wrong, it should be -cvf file.

Yes, for 2), you use -tvf to list and -xvf to extract.
Balasubramanian S
Frequent Advisor

Re: tar cfv, rvf, tvf and xvf

I hope following helps you,

[Tru64 UNIX] The syntax of the tar command has recently changed. The
minus sign (-) at the beginning of a key/option set is no longer
optional. If tar sees a minus sign in front of an option that
requires an argument, tar expects the argument to follow the option
immediately. In order to use the original tar syntax in existing
scripts, you must remove the minus sign if more than one option
requiring an argument is given. Consider this command in the old
form:

tar -xbfp 20 /dev/ntape/tape0

Under the new implementation, this command becomes

tar xbfp 20 /dev/ntape/tape0

or

tar -xb 20 -f /dev/ntape/tape0 -p