1

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.

  • 1
    What about using find . -iname "*.rar" -exec 7z e {} -oOPT -p$(cat passwd.txt) \; ? – Michal Przybylowicz Aug 26 '19 at 14:01
  • Hi @Michal Przybylowicz : Thanks your reply. This work fine. But I also want to know why My command can't. – curlywei Aug 26 '19 at 14:12
  • I also try find . -iname "*.rar" -exec 7z x {} -oOPT -p$(cat passwd.txt) -r +, but I got the error report find: missing argument to `-exec' . Why + can't. – curlywei Aug 26 '19 at 14:16
  • You can try to use double quotes like this 7z e "*.rar" -oOPT -p$(cat passwd.txt). – Michal Przybylowicz Aug 26 '19 at 14:18
  • 1
    Hi @Michal Przybylowicz: 7z e "*.rar" -oOPT -p$(cat passwd.txt) is work fine. Could you post it to answer? Thanks! – curlywei Aug 26 '19 at 14:21
1

You need to put double quotes around the *.rar part of the command :

7z e "*.rar" -oOPT -p$(cat passwd.txt)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.