Bill Jonas on Thu, 19 Apr 2001 13:50:13 -0400

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] TAR command line question

On Thu, Apr 19, 2001 at 10:50:41AM -0400, Rupert Heesom wrote:
> In my LPIC studies, the command line of "TAR CVFB /DEV/TAPE 20 /" is
> supposed to be correct because the order of the modifiers are the same
> as the arguments.
> Now, when I look at the command line,  assuming that the modifier "C"
> correlates to "/dev/tape", "F" to "/" and "B" to "20", I think that the
> arguments should be in the order of "/dev/tape / 20".

'f' is where you want the output created.  It could be 'filename.tar', '-'
(for stdout), or '/dev/tape', for example.  'c' just means to create the
archive -- it doesn't correlate to any of the arguments, really (except
the list of files, I suppose).  I've never used the 'b' option, so I
really don't know where its argument would go, although do note that
according to the man page, 20 is the default for GNU tar anyway.

Couple of examples:

$ tar cf filename.tar *    #Create an archive called 'filename.tar'
                           #containing all files
$ tar cf - . |gzip -c - >file.tar.gz #Compress the file along the way

I just think of it as 'tar <options> <filename> <filelist>'.  OTOH, I
could be off-base with this (I've never specified the blocksize, for
example, so I can't intelligently discuss that).  See tar(1) for the
tersest tar treatise you'd ever care to look at.

Bill Jonas    *    *
"As we enjoy great advantages from the inventions of others,  we should
be glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously."          -- Benjamin Franklin

Philadelphia Linux Users Group       -
General Discussion  -