How to use 7z in Ubuntu 18.04
overview
7z实例
lwk@qwfys:~/Downloads/PHPWEB/4xxx/7z$ sh -c 'for bin in ./*; do echo $(basename $bin); done'
4131.7z
4132.7z
4133.7z
lwk@qwfys:~/Downloads/PHPWEB/4xxx/7z$
lwk@qwfys:~/Downloads/PHPWEB/4xxx/7z$ sh -c 'for bin in ./*; do test1=$(basename $bin); test2=${test1%.7z};7z x $test1 -r -o$test2; done'
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (906E9),ASM,AES-NI)
Scanning the drive for archives:
1 file, 2410442 bytes (2354 KiB)
Extracting archive: 4131.7z
--
Path = 4131.7z
Type = 7z
Physical Size = 2410442
Headers Size = 25212
Method = LZMA:23
Solid = +
Blocks = 1
Everything is Ok
Folders: 401
Files: 2851
Size: 7409514
Compressed: 2410442
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (906E9),ASM,AES-NI)
Scanning the drive for archives:
1 file, 3065808 bytes (2994 KiB)
Extracting archive: 4132.7z
--
Path = 4132.7z
Type = 7z
Physical Size = 3065808
Headers Size = 27061
Method = LZMA:23
Solid = +
Blocks = 1
Everything is Ok
Folders: 423
Files: 3071
Size: 8364693
Compressed: 3065808
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (906E9),ASM,AES-NI)
Scanning the drive for archives:
1 file, 2272462 bytes (2220 KiB)
Extracting archive: 4133.7z
--
Path = 4133.7z
Type = 7z
Physical Size = 2272462
Headers Size = 23137
Method = LZMA:23
Solid = +
Blocks = 1
Everything is Ok
Folders: 368
Files: 2526
Size: 6591195
Compressed: 2272462