$ tar -tvf MURI20220722.tar --wildcards "*2022072201*"
1時だけリストアップ。
参考↓
↓は、--wildcardsを使ってない。
@1/12’24
アーカイブされたファイルがディレクトリ構成を持つ場合、
ファイル名の前にもワイルドカードを置かないといけない模様。
e.g)NG
tar tvf kink20230601.tar --wildcards "MIYAMA0000-20230601-*-EL01*" (return)
[message]
tar: MIYAMA0000-20230601-*-EL01*: アーカイブ内に見つかりません
tar: 前のエラーにより失敗ステータスで終了します
e.g)OK
tar tvf kink20230601.tar --wildcards "*MIYAMA0000-20230601-*-EL01*" (return)
@1/27’24
cpf :: createはwildcardの利用ができない模様。
ファイル名には利用可能。
eg.
NG:
tar cpf tar.amd.tar ??\amd*14163
OK:
tar cpf tar.amd.tar 01\amd*14163 02\amd*14163 03\amd*14163
□
--------- tar --help -----------------
tar(bsdtar): manipulate archive files
First option must be a mode specifier:
-c Create -r Add/Replace -t List -u Update -x Extract
Common Options:
-b # Use # 512-byte records per I/O block
-f <filename> Location of archive (default \\.\tape0)
-v Verbose
-w Interactive
Create: tar -c [options] [<file> | <dir> | @<archive> | -C <dir> ]
<file>, <dir> add these items to archive
-z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma
--format {ustar|pax|cpio|shar} Select archive format
--exclude <pattern> Skip files that match pattern
-C <dir> Change to <dir> before processing remaining files
@<archive> Add entries from <archive> to output
List: tar -t [options] [<patterns>]
<patterns> If specified, list only entries that match
Extract: tar -x [options] [<patterns>]
<patterns> If specified, extract only entries that match
-k Keep (don't overwrite) existing files
-m Don't restore modification times
-O Write entries to stdout, don't restore to disk
-p Restore permissions (including ACLs, owner, file flags)
bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp
-------------------------------------------------------------------
⇧を素直に解釈すると*14163を取り出すには
tar xvf amd2017.tar *14163
で、よい。