ソートされた順序でファイルを圧縮するには?

ソートされた順序でファイルを圧縮するには?

ディレクトリに再帰的にアクセスする場合は、オペレーティングtarシステムのreaddir

ただし、場合によっては、ソートされたファイルをtarとして処理することをお勧めします。

アルファベット順にソートされたディレクトリを圧縮する良い方法は何ですか?


この質問の目的に応じて、一般的なLinuxシステムのgnu-tarは問題ありません。

ベストアンサー1

GNUの場合tar

--sort=ORDER
 Specify the directory sorting order when reading directories.
 ORDER may be one of the following:

`none'
      No directory sorting is performed. This is the default.

`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.

`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.

また、一度見たいと思うかもしれません--preserve-order

おすすめ記事