My filelist in work dir:
'[CASO] SHIROBAKO [01][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [02][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [03][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [04][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [06][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [07][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [08][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [09][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [10][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [11][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [12][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [13][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [14][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [15][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [16][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [17][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [18][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [19][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [20][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [21][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [22][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [23][Ma10p_1080p][x265_2flac].rar'
'[CASO] SHIROBAKO [24][Ma10p_1080p][x265_2flac].rar'
'Daisan Hikou Shoujotai.rar'
Exodus.rar
passwd.txt
Scans.rar
SPs.part1.rar
SPs.part2.rar
SPs.part4.rar
I try to use 7z extract above *.rar files:
7z e *.rar -oOPT -p$(cat passwd.txt) -r
but result:
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 864186364 bytes (825 MiB)
Extracting archive: [CASO] SHIROBAKO [01][Ma10p_1080p][x265_2flac].rar
--
Path = [CASO] SHIROBAKO [01][Ma10p_1080p][x265_2flac].rar
Type = Rar
Physical Size = 864186364
Solid = -
Blocks = 2
Multivolume = -
Volumes = 1
No files to process
Everything is Ok
Files: 0
Size: 0
Compressed: 864186364
That seems does not work. I feel confused.
find . -iname "*.rar" -exec 7z e {} -oOPT -p$(cat passwd.txt) \;
? – Michal Przybylowicz Aug 26 '19 at 14:01find . -iname "*.rar" -exec 7z x {} -oOPT -p$(cat passwd.txt) -r +
, but I got the error reportfind: missing argument to `-exec'
. Why+
can't. – curlywei Aug 26 '19 at 14:167z e "*.rar" -oOPT -p$(cat passwd.txt)
. – Michal Przybylowicz Aug 26 '19 at 14:187z e "*.rar" -oOPT -p$(cat passwd.txt)
is work fine. Could you post it to answer? Thanks! – curlywei Aug 26 '19 at 14:217z
doesn't look at the-p
option when multiple filename arguments are given--but unlike the overwhelming majority of commands on a Unix-like system, it does its own interpretation of globs like*.rar
to specify multiple files, and when run with one such argument, it does respect-p
. Either single or double quotes are fine here, as both prevent the shell from expanding*.rar
into multiple arguments to7z
. Since you came up with the solution, I recommend posting an answer about it, as curlywei suggested. – Eliah Kagan Aug 26 '19 at 14:24\*.rar
also can work fine same to"*.rar"
– curlywei Aug 26 '19 at 15:15-r
flag since the manual saysDo not use "-r" because this flag does not do what you think.
Unfortunately it does not explain what it actually does. – Michal Przybylowicz Aug 26 '19 at 15:24-r: Enable recurse subdirectories.
. Yes,this flag does not do what you think.
. Thanks your mentions. – curlywei Aug 26 '19 at 15:29