db6a10aa1ca14b30d60bee72d95116a9a8a31897
[dragonfly.git] / contrib / libarchive-2 / tar / bsdtar.1
1 .\" Copyright (c) 2003-2007 Tim Kientzle
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/usr.bin/tar/bsdtar.1,v 1.35 2007/05/29 05:39:10 kientzle Exp $
26 .\"
27 .Dd April 13, 2004
28 .Dt BSDTAR 1
29 .Os
30 .Sh NAME
31 .Nm tar
32 .Nd manipulate tape archives
33 .Sh SYNOPSIS
34 .Nm
35 .Op Ar bundled-flags Ao args Ac
36 .Op Ao Ar file Ac | Ao Ar pattern Ac ...
37 .Nm
38 .Brq Fl c
39 .Op Ar options
40 .Op Ar files | directories
41 .Nm
42 .Brq Fl r | Fl u
43 .Fl f Ar archive-file
44 .Op Ar options
45 .Op Ar files | directories
46 .Nm
47 .Brq Fl t | Fl x
48 .Op Ar options
49 .Op Ar patterns
50 .Sh DESCRIPTION
51 .Nm
52 creates and manipulates streaming archive files.
53 This implementation can extract from tar, pax, cpio, zip, jar, ar,
54 and ISO 9660 cdrom images and can create tar, pax, cpio, ar,
55 and shar archives.
56 .Pp
57 The first synopsis form shows a
58 .Dq bundled
59 option word.
60 This usage is provided for compatibility with historical implementations.
61 See COMPATIBILITY below for details.
62 .Pp
63 The other synopsis forms show the preferred usage.
64 The first option to
65 .Nm
66 is a mode indicator from the following list:
67 .Bl -tag -compact -width indent
68 .It Fl c
69 Create a new archive containing the specified items.
70 .It Fl r
71 Like
72 .Fl c ,
73 but new entries are appended to the archive.
74 Note that this only works on uncompressed archives stored in regular files.
75 The
76 .Fl f
77 option is required.
78 .It Fl t
79 List archive contents to stdout.
80 .It Fl u
81 Like
82 .Fl r ,
83 but new entries are added only if they have a modification date
84 newer than the corresponding entry in the archive.
85 Note that this only works on uncompressed archives stored in regular files.
86 The
87 .Fl f
88 option is required.
89 .It Fl x
90 Extract to disk from the archive.
91 If a file with the same name appears more than once in the archive,
92 each copy will be extracted, with later copies overwriting (replacing)
93 earlier copies.
94 .El
95 .Pp
96 In
97 .Fl c ,
98 .Fl r ,
99 or
100 .Fl u
101 mode, each specified file or directory is added to the
102 archive in the order specified on the command line.
103 By default, the contents of each directory are also archived.
104 .Pp
105 In extract or list mode, the entire command line
106 is read and parsed before the archive is opened.
107 The pathnames or patterns on the command line indicate
108 which items in the archive should be processed.
109 Patterns are shell-style globbing patterns as
110 documented in
111 .Xr tcsh 1 .
112 .Sh OPTIONS
113 Unless specifically stated otherwise, options are applicable in
114 all operating modes.
115 .Bl -tag -width indent
116 .It Cm @ Ns Pa archive
117 (c and r mode only)
118 The specified archive is opened and the entries
119 in it will be appended to the current archive.
120 As a simple example,
121 .Dl Nm Fl c Fl f Pa - Pa newfile Cm @ Ns Pa original.tar
122 writes a new archive to standard output containing a file
123 .Pa newfile
124 and all of the entries from
125 .Pa original.tar .
126 In contrast,
127 .Dl Nm Fl c Fl f Pa - Pa newfile Pa original.tar
128 creates a new archive with only two entries.
129 Similarly,
130 .Dl Nm Fl czf Pa - Fl -format Cm pax Cm @ Ns Pa -
131 reads an archive from standard input (whose format will be determined
132 automatically) and converts it into a gzip-compressed
133 pax-format archive on stdout.
134 In this way,
135 .Nm
136 can be used to convert archives from one format to another.
137 .It Fl b Ar blocksize
138 Specify the block size, in 512-byte records, for tape drive I/O.
139 As a rule, this argument is only needed when reading from or writing
140 to tape drives, and usually not even then as the default block size of
141 20 records (10240 bytes) is very common.
142 .It Fl C Ar directory
143 In c and r mode, this changes the directory before adding
144 the following files.
145 In x mode, change directories after opening the archive
146 but before extracting entries from the archive.
147 .It Fl -check-links ( Fl W Cm check-links )
148 (c and r modes only)
149 Issue a warning message unless all links to each file are archived.
150 .It Fl -exclude Ar pattern ( Fl W Cm exclude Ns = Ns Ar pattern )
151 Do not process files or directories that match the
152 specified pattern.
153 Note that exclusions take precedence over patterns or filenames
154 specified on the command line.
155 .It Fl -format Ar format ( Fl W Cm format Ns = Ns Ar format )
156 (c mode only)
157 Use the specified format for the created archive.
158 Supported formats include
159 .Dq cpio ,
160 .Dq pax ,
161 .Dq shar ,
162 and
163 .Dq ustar .
164 Other formats may also be supported; see
165 .Xr libarchive-formats 5
166 for more information about currently-supported formats.
167 .It Fl f Ar file
168 Read the archive from or write the archive to the specified file.
169 The filename can be
170 .Pa -
171 for standard input or standard output.
172 If not specified, the default tape device will be used.
173 (On
174 .Fx ,
175 the default tape device is
176 .Pa /dev/sa0 . )
177 .It Fl -fast-read ( Fl W Cm fast-read )
178 (x and t mode only)
179 Extract or list only the first archive entry that matches each pattern
180 or filename operand.
181 Exit as soon as each specified pattern or filename has been matched.
182 By default, the archive is always read to the very end, since
183 there can be multiple entries with the same name and, by convention,
184 later entries overwrite earlier entries.
185 This option is provided as a performance optimization.
186 .It Fl H
187 (c and r mode only)
188 Symbolic links named on the command line will be followed; the
189 target of the link will be archived, not the link itself.
190 .It Fl h
191 (c and r mode only)
192 Synonym for
193 .Fl L .
194 .It Fl I
195 Synonym for
196 .Fl T .
197 .It Fl -include Ar pattern ( Fl W Cm include Ns = Ns Ar pattern )
198 Process only files or directories that match the specified pattern.
199 Note that exclusions specified with
200 .Fl -exclude
201 take precedence over inclusions.
202 If no inclusions are explicitly specified, all entries are processed by
203 default.
204 The
205 .Fl -include
206 option is especially useful when filtering archives.
207 For example, the command
208 .Dl Nm Fl c Fl f Pa new.tar Fl -include='*foo*' Cm @ Ns Pa old.tgz
209 creates a new archive
210 .Pa new.tar
211 containing only the entries from
212 .Pa old.tgz
213 containing the string
214 .Sq foo .
215 .It Fl j
216 (c mode only)
217 Compress the resulting archive with
218 .Xr bzip2 1 .
219 In extract or list modes, this option is ignored.
220 Note that, unlike other
221 .Nm tar
222 implementations, this implementation recognizes bzip2 compression
223 automatically when reading archives.
224 .It Fl k
225 (x mode only)
226 Do not overwrite existing files.
227 In particular, if a file appears more than once in an archive,
228 later copies will not overwrite earlier copies.
229 .It Fl L
230 (c and r mode only)
231 All symbolic links will be followed.
232 Normally, symbolic links are archived as such.
233 With this option, the target of the link will be archived instead.
234 .It Fl l
235 If
236 .Ev POSIXLY_CORRECT
237 is specified in the environment, this is a synonym for the
238 .Fl -check-links
239 option.
240 Otherwise, an error will be displayed.
241 Users who desire behavior compatible with GNU tar should use
242 the
243 .Fl -one-file-system
244 option instead.
245 .It Fl m
246 (x mode only)
247 Do not extract modification time.
248 By default, the modification time is set to the time stored in the archive.
249 .It Fl n
250 (c, r, u modes only)
251 Do not recursively archive the contents of directories.
252 .It Fl -newer Ar date ( Fl W Cm newer Ns = Ns Ar date )
253 (c, r, u modes only)
254 Only include files and directories newer than the specified date.
255 This compares ctime entries.
256 .It Fl -newer-mtime Ar date ( Fl W Cm newer-mtime Ns = Ns Ar date )
257 (c, r, u modes only)
258 Like
259 .Fl -newer ,
260 except it compares mtime entries instead of ctime entries.
261 .It Fl -newer-than Pa file ( Fl W Cm newer-than Ns = Ns Pa file )
262 (c, r, u modes only)
263 Only include files and directories newer than the specified file.
264 This compares ctime entries.
265 .It Fl -newer-mtime-than Pa file ( Fl W Cm newer-mtime-than Ns = Ns Pa file )
266 (c, r, u modes only)
267 Like
268 .Fl -newer-than ,
269 except it compares mtime entries instead of ctime entries.
270 .It Fl -nodump ( Fl W Cm nodump )
271 (c and r modes only)
272 Honor the nodump file flag by skipping this file.
273 .It Fl -null ( Fl W Cm null )
274 (use with
275 .Fl I ,
276 .Fl T ,
277 or
278 .Fl X )
279 Filenames or patterns are separated by null characters,
280 not by newlines.
281 This is often used to read filenames output by the
282 .Fl print0
283 option to
284 .Xr find 1 .
285 .It Fl O
286 (x, t modes only)
287 In extract (-x) mode, files will be written to standard out rather than
288 being extracted to disk.
289 In list (-t) mode, the file listing will be written to stderr rather than
290 the usual stdout.
291 .It Fl o
292 (x mode only)
293 Use the user and group of the user running the program rather
294 than those specified in the archive.
295 Note that this has no significance unless
296 .Fl p
297 is specified, and the program is being run by the root user.
298 In this case, the file modes and flags from
299 the archive will be restored, but ACLs or owner information in
300 the archive will be discarded.
301 .It Fl -one-file-system ( Fl W Cm one-file-system )
302 (c, r, and u modes)
303 Do not cross mount points.
304 .It Fl P
305 Preserve pathnames.
306 By default, absolute pathnames (those that begin with a /
307 character) have the leading slash removed both when creating archives
308 and extracting from them.
309 Also,
310 .Nm
311 will refuse to extract archive entries whose pathnames contain
312 .Pa ..
313 or whose target directory would be altered by a symlink.
314 This option suppresses these behaviors.
315 .It Fl p
316 (x mode only)
317 Preserve file permissions.
318 Attempt to restore the full permissions, including owner, file modes, file
319 flags and ACLs, if available, for each item extracted from the archive.
320 By default, newly-created files are owned by the user running
321 .Nm ,
322 the file mode is restored for newly-created regular files, and
323 all other types of entries receive default permissions.
324 If
325 .Nm
326 is being run by root, the default is to restore the owner unless the
327 .Fl o
328 option is also specified.
329 .It Fl -strip-components Ar count ( Fl W Cm strip-components Ns = Ns Ar count )
330 (x and t mode only)
331 Remove the specified number of leading path elements.
332 Pathnames with fewer elements will be silently skipped.
333 Note that the pathname is edited after checking inclusion/exclusion patterns
334 but before security checks.
335 .It Fl T Ar filename
336 In x or t mode,
337 .Nm
338 will read the list of names to be extracted from
339 .Pa filename .
340 In c mode,
341 .Nm
342 will read names to be archived from
343 .Pa filename .
344 The special name
345 .Dq -C
346 on a line by itself will cause the current directory to be changed to
347 the directory specified on the following line.
348 Names are terminated by newlines unless
349 .Fl -null
350 is specified.
351 Note that
352 .Fl -null
353 also disables the special handling of lines containing
354 .Dq -C .
355 .It Fl U
356 (x mode only)
357 Unlink files before creating them.
358 Without this option,
359 .Nm
360 overwrites existing files, which preserves existing hardlinks.
361 With this option, existing hardlinks will be broken, as will any
362 symlink that would affect the location of an extracted file.
363 .It Fl -use-compress-program Ar program
364 Pipe the input (in x or t mode) or the output (in c mode) through
365 .Pa program
366 instead of using the builtin compression support.
367 .It Fl v
368 Produce verbose output.
369 In create and extract modes,
370 .Nm
371 will list each file name as it is read from or written to
372 the archive.
373 In list mode,
374 .Nm
375 will produce output similar to that of
376 .Xr ls 1 .
377 Additional
378 .Fl v
379 options will provide additional detail.
380 .It Fl W Ar longopt=value
381 Long options (preceded by
382 .Fl - )
383 are only supported directly on systems that have the
384 .Xr getopt_long 3
385 function.
386 The
387 .Fl W
388 option can be used to access long options on systems that
389 do not support this function.
390 .It Fl w
391 Ask for confirmation for every action.
392 .It Fl X Ar filename
393 Read a list of exclusion patterns from the specified file.
394 See
395 .Fl -exclude
396 for more information about the handling of exclusions.
397 .It Fl y
398 (c mode only)
399 Compress the resulting archive with
400 .Xr bzip2 1 .
401 In extract or list modes, this option is ignored.
402 Note that, unlike other
403 .Nm tar
404 implementations, this implementation recognizes bzip2 compression
405 automatically when reading archives.
406 .It Fl z
407 (c mode only)
408 Compress the resulting archive with
409 .Xr gzip 1 .
410 In extract or list modes, this option is ignored.
411 Note that, unlike other
412 .Nm tar
413 implementations, this implementation recognizes gzip compression
414 automatically when reading archives.
415 .El
416 .Sh ENVIRONMENT
417 The following environment variables affect the execution of
418 .Nm :
419 .Bl -tag -width ".Ev BLOCKSIZE"
420 .It Ev LANG
421 The locale to use.
422 See
423 .Xr environ 7
424 for more information.
425 .It Ev POSIXLY_CORRECT
426 If this environment variable is defined, the
427 .Fl l
428 option will be interpreted in accordance with
429 .St -p1003.1-96 .
430 .It Ev TAPE
431 The default tape device.
432 The
433 .Fl f
434 option overrides this.
435 .It Ev TZ
436 The timezone to use when displaying dates.
437 See
438 .Xr environ 7
439 for more information.
440 .El
441 .Sh FILES
442 .Bl -tag -width ".Ev BLOCKSIZE"
443 .It Pa /dev/sa0
444 The default tape device, if not overridden by the
445 .Ev TAPE
446 environment variable or the
447 .Fl f
448 option.
449 .El
450 .Sh EXIT STATUS
451 .Ex -std
452 .Sh EXAMPLES
453 The following creates a new archive
454 called
455 .Ar file.tar.gz
456 that contains two files
457 .Ar source.c
458 and
459 .Ar source.h :
460 .Dl Nm Fl czf Pa file.tar.gz Pa source.c Pa source.h
461 .Pp
462 To view a detailed table of contents for this
463 archive:
464 .Dl Nm Fl tvf Pa file.tar.gz
465 .Pp
466 To extract all entries from the archive on
467 the default tape drive:
468 .Dl Nm Fl x
469 .Pp
470 To examine the contents of an ISO 9660 cdrom image:
471 .Dl Nm Fl tf Pa image.iso
472 .Pp
473 To move file hierarchies, invoke
474 .Nm
475 as
476 .Dl Nm Fl cf Pa - Fl C Pa srcdir\ . | Nm Fl xpf Pa - Fl C Pa destdir
477 or more traditionally
478 .Dl cd srcdir \&; Nm Fl cf Pa -\ . | ( cd destdir \&; Nm Fl xpf Pa - )
479 .Pp
480 In create mode, the list of files and directories to be archived
481 can also include directory change instructions of the form
482 .Cm -C Ns Pa foo/baz
483 and archive inclusions of the form
484 .Cm @ Ns Pa archive-file .
485 For example, the command line
486 .Dl Nm Fl c Fl f Pa new.tar Pa foo1 Cm @ Ns Pa old.tgz Cm -C Ns Pa /tmp Pa foo2
487 will create a new archive
488 .Pa new.tar .
489 .Nm
490 will read the file
491 .Pa foo1
492 from the current directory and add it to the output archive.
493 It will then read each entry from
494 .Pa old.tgz
495 and add those entries to the output archive.
496 Finally, it will switch to the
497 .Pa /tmp
498 directory and add
499 .Pa foo2
500 to the output archive.
501 .Pp
502 The
503 .Fl -newer
504 and
505 .Fl -newer-mtime
506 switches accept a variety of common date and time specifications, including
507 .Dq 12 Mar 2005 7:14:29pm ,
508 .Dq 2005-03-12 19:14 ,
509 .Dq 5 minutes ago ,
510 and
511 .Dq 19:14 PST May 1 .
512 .Sh COMPATIBILITY
513 The bundled-arguments format is supported for compatibility
514 with historic implementations.
515 It consists of an initial word (with no leading - character) in which
516 each character indicates an option.
517 Arguments follow as separate words.
518 The order of the arguments must match the order
519 of the corresponding characters in the bundled command word.
520 For example,
521 .Dl Nm Cm tbf 32 Pa file.tar
522 specifies three flags
523 .Cm t ,
524 .Cm b ,
525 and
526 .Cm f .
527 The
528 .Cm b
529 and
530 .Cm f
531 flags both require arguments,
532 so there must be two additional items
533 on the command line.
534 The
535 .Ar 32
536 is the argument to the
537 .Cm b
538 flag, and
539 .Ar file.tar
540 is the argument to the
541 .Cm f
542 flag.
543 .Pp
544 The mode options c, r, t, u, and x and the options
545 b, f, l, m, o, v, and w comply with SUSv2.
546 .Pp
547 For maximum portability, scripts that invoke
548 .Nm tar
549 should use the bundled-argument format above, should limit
550 themselves to the
551 .Cm c ,
552 .Cm t ,
553 and
554 .Cm x
555 modes, and the
556 .Cm b ,
557 .Cm f ,
558 .Cm m ,
559 .Cm v ,
560 and
561 .Cm w
562 options.
563 .Pp
564 On systems that support getopt_long(), additional long options
565 are available to improve compatibility with other tar implementations.
566 .Sh SECURITY
567 Certain security issues are common to many archiving programs, including
568 .Nm .
569 In particular, carefully-crafted archives can request that
570 .Nm
571 extract files to locations outside of the target directory.
572 This can potentially be used to cause unwitting users to overwrite
573 files they did not intend to overwrite.
574 If the archive is being extracted by the superuser, any file
575 on the system can potentially be overwritten.
576 There are three ways this can happen.
577 Although
578 .Nm
579 has mechanisms to protect against each one,
580 savvy users should be aware of the implications:
581 .Bl -bullet -width indent
582 .It
583 Archive entries can have absolute pathnames.
584 By default,
585 .Nm
586 removes the leading
587 .Pa /
588 character from filenames before restoring them to guard against this problem.
589 .It
590 Archive entries can have pathnames that include
591 .Pa ..
592 components.
593 By default,
594 .Nm
595 will not extract files containing
596 .Pa ..
597 components in their pathname.
598 .It
599 Archive entries can exploit symbolic links to restore
600 files to other directories.
601 An archive can restore a symbolic link to another directory,
602 then use that link to restore a file into that directory.
603 To guard against this,
604 .Nm
605 checks each extracted path for symlinks.
606 If the final path element is a symlink, it will be removed
607 and replaced with the archive entry.
608 If
609 .Fl U
610 is specified, any intermediate symlink will also be unconditionally removed.
611 If neither
612 .Fl U
613 nor
614 .Fl P
615 is specified,
616 .Nm
617 will refuse to extract the entry.
618 .El
619 To protect yourself, you should be wary of any archives that
620 come from untrusted sources.
621 You should examine the contents of an archive with
622 .Dl Nm Fl tf Pa filename
623 before extraction.
624 You should use the
625 .Fl k
626 option to ensure that
627 .Nm
628 will not overwrite any existing files or the
629 .Fl U
630 option to remove any pre-existing files.
631 You should generally not extract archives while running with super-user
632 privileges.
633 Note that the
634 .Fl P
635 option to
636 .Nm
637 disables the security checks above and allows you to extract
638 an archive while preserving any absolute pathnames,
639 .Pa ..
640 components, or symlinks to other directories.
641 .Sh SEE ALSO
642 .Xr bzip2 1 ,
643 .Xr cpio 1 ,
644 .Xr gzip 1 ,
645 .Xr mt 1 ,
646 .Xr pax 1 ,
647 .Xr shar 1 ,
648 .Xr libarchive 3 ,
649 .Xr libarchive-formats 5 ,
650 .Xr tar 5
651 .Sh STANDARDS
652 There is no current POSIX standard for the tar command; it appeared
653 in
654 .St -p1003.1-96
655 but was dropped from
656 .St -p1003.1-2001 .
657 The options used by this implementation were developed by surveying a
658 number of existing tar implementations as well as the old POSIX specification
659 for tar and the current POSIX specification for pax.
660 .Pp
661 The ustar and pax interchange file formats are defined by
662 .St -p1003.1-2001
663 for the pax command.
664 .Sh HISTORY
665 A
666 .Nm tar
667 command appeared in Seventh Edition Unix, which was released in January, 1979.
668 There have been numerous other implementations,
669 many of which extended the file format.
670 John Gilmore's
671 .Nm pdtar
672 public-domain implementation (circa November, 1987)
673 was quite influential, and formed the basis of GNU tar.
674 GNU tar was included as the standard system tar
675 in
676 .Fx
677 beginning with
678 .Fx 1.0 .
679 .Pp
680 This is a complete re-implementation based on the
681 .Xr libarchive 3
682 library.
683 .Sh BUGS
684 POSIX and GNU violently disagree about the meaning of the
685 .Fl l
686 option.
687 Because of the potential for disaster if someone expects
688 one behavior and gets the other, the
689 .Fl l
690 option is deliberately broken in this implementation.
691 .Pp
692 The
693 .Fl C Pa dir
694 option may differ from historic implementations.
695 .Pp
696 All archive output is written in correctly-sized blocks, even
697 if the output is being compressed.
698 Whether or not the last output block is padded to a full
699 block size varies depending on the format and the
700 output device.
701 For tar and cpio formats, the last block of output is padded
702 to a full block size if the output is being
703 written to standard output or to a character or block device such as
704 a tape drive.
705 If the output is being written to a regular file, the last block
706 will not be padded.
707 Many compressors, including
708 .Xr gzip 1
709 and
710 .Xr bzip2 1 ,
711 complain about the null padding when decompressing an archive created by
712 .Nm ,
713 although they still extract it correctly.
714 .Pp
715 The compression and decompression is implemented internally, so
716 there may be insignificant differences between the compressed output
717 generated by
718 .Dl Nm Fl czf Pa - file
719 and that generated by
720 .Dl Nm Fl cf Pa - file | Nm gzip
721 .Pp
722 The default should be to read and write archives to the standard I/O paths,
723 but tradition (and POSIX) dictates otherwise.
724 .Pp
725 The
726 .Cm r
727 and
728 .Cm u
729 modes require that the archive be uncompressed
730 and located in a regular file on disk.
731 Other archives can be modified using
732 .Cm c
733 mode with the
734 .Pa @archive-file
735 extension.
736 .Pp
737 To archive a file called
738 .Pa @foo
739 or
740 .Pa -foo
741 you must specify it as
742 .Pa ./@foo
743 or
744 .Pa ./-foo ,
745 respectively.
746 .Pp
747 In create mode, a leading
748 .Pa ./
749 is always removed.
750 A leading
751 .Pa /
752 is stripped unless the
753 .Fl P
754 option is specified.
755 .Pp
756 There needs to be better support for file selection on both create
757 and extract.
758 .Pp
759 There is not yet any support for multi-volume archives or for archiving
760 sparse files.
761 .Pp
762 Converting between dissimilar archive formats (such as tar and cpio) using the
763 .Cm @ Ns Pa -
764 convention can cause hard link information to be lost.
765 (This is a consequence of the incompatible ways that different archive
766 formats store hardlink information.)
767 .Pp
768 There are alternative long options for many of the short options that
769 are deliberately not documented.