|
Lines 8-17
Link Here
|
| 8 |
.\" |
8 |
.\" |
| 9 |
.Dd December 23, 2000 |
9 |
.Dd December 23, 2000 |
| 10 |
.Os |
10 |
.Os |
| 11 |
.Dt TAR 1 |
11 |
.Dt GNU TAR 1 |
| 12 |
.Sh NAME |
12 |
.Sh NAME |
| 13 |
.Nm tar |
13 |
.Nm gtar |
| 14 |
.Nd "tape archiver; manipulate ""tar"" archive files" |
14 |
.Nd GNU "tape archiver; manipulate ""tar"" archive files" |
| 15 |
.Sh SYNOPSIS |
15 |
.Sh SYNOPSIS |
| 16 |
.Nm |
16 |
.Nm |
| 17 |
.Op Oo Fl Oc Ns Ar bundled-options Ar Args |
17 |
.Op Oo Fl Oc Ns Ar bundled-options Ar Args |
|
Lines 379-387
Link Here
|
| 379 |
and |
379 |
and |
| 380 |
.Pa ernie , |
380 |
.Pa ernie , |
| 381 |
you can enter |
381 |
you can enter |
| 382 |
.Dl "tar cfb /dev/sa0 20 bert ernie" |
382 |
.Dl "gtar cfb /dev/sa0 20 bert ernie" |
| 383 |
or |
383 |
or |
| 384 |
.Dl "tar --create --file /dev/sa0 --block-size 20 bert ernie" |
384 |
.Dl "gtar --create --file /dev/sa0 --block-size 20 bert ernie" |
| 385 |
Note that the |
385 |
Note that the |
| 386 |
.Fl f |
386 |
.Fl f |
| 387 |
and |
387 |
and |
|
Lines 393-404
Link Here
|
| 393 |
.Pa /dev/sa0 |
393 |
.Pa /dev/sa0 |
| 394 |
is the default device, and 20 is the default block |
394 |
is the default device, and 20 is the default block |
| 395 |
size, the above example could have simply been |
395 |
size, the above example could have simply been |
| 396 |
.Dl "tar c bert ernie" |
396 |
.Dl "gtar c bert ernie" |
| 397 |
.Pp |
397 |
.Pp |
| 398 |
To extract all the C sources and headers from an archive named |
398 |
To extract all the C sources and headers from an archive named |
| 399 |
.Pa backup.tar , |
399 |
.Pa backup.tar , |
| 400 |
type |
400 |
type |
| 401 |
.Dl "tar xf backup.tar '*.[ch]'" |
401 |
.Dl "gtar xf backup.tar '*.[ch]'" |
| 402 |
Note that the pattern must be quoted to prevent the shell from |
402 |
Note that the pattern must be quoted to prevent the shell from |
| 403 |
attempting to expand it according the files in the current working |
403 |
attempting to expand it according the files in the current working |
| 404 |
directory (the shell does not have access to the list of files in |
404 |
directory (the shell does not have access to the list of files in |
|
Lines 406-432
Link Here
|
| 406 |
.Pp |
406 |
.Pp |
| 407 |
To move file hierarchies, use a command line like this: |
407 |
To move file hierarchies, use a command line like this: |
| 408 |
.Bd -literal |
408 |
.Bd -literal |
| 409 |
tar -cf - -C srcdir . | tar xpf - -C destdir |
409 |
gtar -cf - -C srcdir . | gtar xpf - -C destdir |
| 410 |
.Ed |
410 |
.Ed |
| 411 |
.Pp |
411 |
.Pp |
| 412 |
To create a compressed archive on diskette, using |
412 |
To create a compressed archive on diskette, using |
| 413 |
.Xr gzip 1 , |
413 |
.Xr gzip 1 , |
| 414 |
use a command-line like |
414 |
use a command-line like |
| 415 |
.Dl "tar --block-compress -z -c -v -f /dev/fd1a -b 36 tar/" |
415 |
.Dl "gtar --block-compress -z -c -v -f /dev/fd1a -b 36 tar/" |
| 416 |
.Pp |
416 |
.Pp |
| 417 |
Note that you cannot mix bundled flags and |
417 |
Note that you cannot mix bundled flags and |
| 418 |
.Fl -style |
418 |
.Fl -style |
| 419 |
flags; you can use |
419 |
flags; you can use |
| 420 |
single-letter flags in the manner above, rather than having to type |
420 |
single-letter flags in the manner above, rather than having to type |
| 421 |
.Dl "tar --block-compress --gzip --verbose --file /dev/fd1a --block-size 20 tar/" |
421 |
.Dl "gtar --block-compress --gzip --verbose --file /dev/fd1a --block-size 20 tar/" |
| 422 |
.Pp |
422 |
.Pp |
| 423 |
The above-created diskette can be listed with |
423 |
The above-created diskette can be listed with |
| 424 |
.Dl "tar tvfbz /dev/fd1a 36" |
424 |
.Dl "gtar tvfbz /dev/fd1a 36" |
| 425 |
.Pp |
425 |
.Pp |
| 426 |
To join two |
426 |
To join two |
| 427 |
.Nm |
427 |
.Nm |
| 428 |
archives into a single archive, use |
428 |
archives into a single archive, use |
| 429 |
.Dl "tar Af archive1.tar archive2.tar" |
429 |
.Dl "gtar Af archive1.tar archive2.tar" |
| 430 |
which will add the files contained in |
430 |
which will add the files contained in |
| 431 |
.Pa archive2.tar |
431 |
.Pa archive2.tar |
| 432 |
onto the end of |
432 |
onto the end of |
|
Lines 441-447
Link Here
|
| 441 |
.Pa srcdir , |
441 |
.Pa srcdir , |
| 442 |
which were modified |
442 |
which were modified |
| 443 |
after Feb.\& 9th 1997, 13:00 h, use |
443 |
after Feb.\& 9th 1997, 13:00 h, use |
| 444 |
.Dl "tar -c -f backup.tar --newer-mtime 'Feb 9 13:15 1997' srcdir/" |
444 |
.Dl "gtar -c -f backup.tar --newer-mtime 'Feb 9 13:15 1997' srcdir/" |
| 445 |
.Pp |
445 |
.Pp |
| 446 |
Other possible time specifications are |
446 |
Other possible time specifications are |
| 447 |
.Sq "02/09/97 13:15" , |
447 |
.Sq "02/09/97 13:15" , |
|
Lines 513-518
Link Here
|
| 513 |
option is for compatibility with Solaris's |
513 |
option is for compatibility with Solaris's |
| 514 |
.Nm . |
514 |
.Nm . |
| 515 |
.Sh SEE ALSO |
515 |
.Sh SEE ALSO |
|
|
516 |
.Xr bsdtar 1 , |
| 516 |
.Xr bzip2 1 , |
517 |
.Xr bzip2 1 , |
| 517 |
.Xr compress 1 , |
518 |
.Xr compress 1 , |
| 518 |
.Xr gzip 1 , |
519 |
.Xr gzip 1 , |
|
Lines 530-535
Link Here
|
| 530 |
.Nm |
531 |
.Nm |
| 531 |
written by |
532 |
written by |
| 532 |
.An John Gilmore . |
533 |
.An John Gilmore . |
|
|
534 |
GNU tar was included as the standard system tar since |
| 535 |
.Fx 1.0 |
| 536 |
and was firstly replaced by |
| 537 |
.Xr bsdtar 1 |
| 538 |
in |
| 539 |
.Fx 5.3 . |
| 533 |
.Sh AUTHORS |
540 |
.Sh AUTHORS |
| 534 |
.An -nosplit |
541 |
.An -nosplit |
| 535 |
A cast of thousands, including [as listed in the |
542 |
A cast of thousands, including [as listed in the |