➜ Desktop zip -sf bb.zip
Archive contains:
bb/
bb/test.html
bb/test.js
Total 3 entries (21848 bytes)
➜ Desktop zipinfo bb.zip
Archive: bb.zip
Zip file size: 6566 bytes, number of entries: 3
drwxr-xr-x 6.3 unx 0 bx stor 24-Aug-02 15:00 bb/
-rw-r--r-- 6.3 unx 883 Bx defN 24-Jul-30 17:54 bb/test.html
-rw-r--r-- 6.3 unx 20965 Bx defN 24-Aug-02 00:07 bb/test.js
3 files, 21848 bytes uncompressed, 6134 bytes compressed: 71.9%
➜ Desktop tar -tf /Users/mac/Desktop/bb.tar
bb/
bb/test.js
bb/test.html
➜ Desktop
➜ Desktop rar l bb.rar
RAR 7.01 Copyright (c) 1993-2024 Alexander Roshal 12 May 2024
Trial version Type 'rar -?' for help
Archive: bb.rar
Details: RAR 5
Attributes Size Date Time Name
----------- --------- ---------- ----- ----
*-rw-r--r-- 6148 2024-08-02 15:37 Users/mac/Desktop/bb/.DS_Store
*-rw-r--r-- 20965 2024-08-02 00:07 Users/mac/Desktop/bb/test.js
*-rw-r--r-- 883 2024-07-30 17:54 Users/mac/Desktop/bb/test.html
drwxr-xr-x 0 2024-08-02 15:36 Users/mac/Desktop/bb
----------- --------- ---------- ----- ----
27996 4
7Zip
加密文件
➜ bb 7z a a.7z -p123
加密文件,隐藏文件名
➜ bb 7z a b.7z -p123 -mhe
➜ bb 7z l /Users/mac/Desktop/bb/a.7z
7-Zip [64] 17.05 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.05 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,4 CPUs x64)
Scanning the drive for archives:
1 file, 6259 bytes (7 KiB)
Listing archive: /Users/mac/Desktop/bb/a.7z
--
Path = /Users/mac/Desktop/bb/a.7z
Type = 7z
Physical Size = 6259
Headers Size = 227
Method = LZMA2:15 7zAES
Solid = +
Blocks = 1
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2024-08-02 16:16:56 ....A 6148 6032 .DS_Store
2024-07-30 17:54:10 ....A 883 test.html
2024-08-02 00:07:16 ....A 20965 test.js
------------------- ----- ------------ ------------ ------------------------
2024-08-02 16:16:56 27996 6032 3 files
另一种隐藏文件名的压缩方式,无法查看,使用中会让输入密码才可以进行下一步输出目录信息
➜ bb 7z l /Users/mac/Desktop/bb/b.7z
7-Zip [64] 17.05 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.05 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,4 CPUs x64)
Scanning the drive for archives:
1 file, 12639 bytes (13 KiB)
Listing archive: /Users/mac/Desktop/bb/b.7z
Enter password (will not be echoed):