I'm running the command
rar a -m0 -v100m rarname.rar *.*
On some files with a bash script. I know I specified the rarname, but because of the -v option which sets a size limit to the rar, this command can make lots of rars named rarname.part1.rar开发者_Go百科, rarname.part2.rar, etc.
What is the best way to get the list of files created?
This should do it:
rarname.*.rar
Globs are not limited to the DOS-style "name.ext" pattern.
You can either capture and parse the output from the rar
command or create the rar'ed files in a temporary directory, and then process the files there.
I'd recommend the later option.
精彩评论