On Fri, 28 Dec 2001, Keith Morse wrote: > On Fri, 28 Dec 2001, Jim Cunning wrote: > > > > My current one off favourite. > > > > > > cd /mnt/cdrom; tar -cvf - . | (cd /mnt/scratch/pub/2/engima;tar -xf - ) > > > > Does this syntax for tar actually work? What version of tar are you > > using? When I try it I get: > > jcunning@bigbear:~ > tar -zft fc-v2.0.tgz > > tar: You must specify one of the `-Acdtrux' options > > Try `tar --help' for more information. > > > > but > > tar zft fc-v2.0.tgz > > works fine. > > > > BTW, it appears that the usage warning is out of date, because it implies > > that the "-" is required. The command "tar --version" gives me > > > > AFAIK "-" to denote a switch is irrelevant to tar. I do it, cuz my > fingers keep putting it in. The command above does actually work, as this > is the exact syntax I used to copy off my cd's to disk. Pasted from > .bash_history. > > > Specifically with your command " tar -zft fc-v2.0.tgz " is nonsensical as > there is no "verb" being used, only modifiers. Notice mine uses " -c > " witch is create. Oops sorry, arguements to tar are postionally > dependent (just took a look at yours again ). You're corrected one would > be: > > tar -ztf fc-v2.0.tgz
OK. Being a tar user since about 1992, meaning "I know how to use tar, so I don't need no stinkin' man pages....," I decided to look deeper and found the following from the tar info pages: This old way of writing `tar' options can surprise even experienced users. For example, the two commands: tar cfz archive.tar.gz file tar -cfz archive.tar.gz file are quite different. The first example uses `archive.tar.gz' as the value for option `f' and recognizes the option `z'. The second example, however, uses `z' as the value for option `f'--probably not what was intended. The bottom line: tar has three ways of accepting options, 1) mnemonic options (using --<long-option-name>), 2) short options (using -<letter>), and 3) "old" options (using single letters in a cluster). Even old dogs can learn new tricks if they RTFM. Jim _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list