开发者

Using bash to get the files rar creates

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜