New option --sort=ORDER
This option makes tar sort the entries of directories that will be added to an archive according to ORDER (none, name, or order). Based on proposition by Dick Streefland (https://savannah.gnu.org/patch/?7892). * src/common.h (savedir_sort_order): New global. * src/create.c: Pass savedir_sort_order to streamsavedir. * src/misc.c: Likewise. * src/tar.c: New option --sort. * NEWS: Update. * doc/tar.texi: Document the --sort option. * doc/tar.1: Likewise.
This commit is contained in:
21
doc/tar.texi
21
doc/tar.texi
@@ -3319,6 +3319,27 @@ The @option{--warning=existing-file} option can be used together with
|
||||
this option to produce warning messages about existing old files
|
||||
(@pxref{warnings}).
|
||||
|
||||
@opsummary{sort}
|
||||
@item --sort=@var{order}
|
||||
Specify the directory sorting order when reading directories.
|
||||
@var{Order} may be one of the following:
|
||||
|
||||
@table @samp
|
||||
@item none
|
||||
No directory sorting is performed. This is the default.
|
||||
|
||||
@item name
|
||||
Sort the directory entries on name. The operating system may deliver
|
||||
directory entries in a more or less random order, and sorting them
|
||||
makes archive creation reproducible.
|
||||
|
||||
@item inode
|
||||
Sort the directory entries on inode number. Sorting directories on
|
||||
inode number may reduce the amount of disk seek operations when
|
||||
creating an archive for some file systems.
|
||||
|
||||
@end table
|
||||
|
||||
@opsummary{sparse}
|
||||
@item --sparse
|
||||
@itemx -S
|
||||
|
||||
Reference in New Issue
Block a user