开发者

how to include files of particular format while tarring a folder

开发者 https://www.devze.com 2022-12-25 22:36 出处:网络
I have the following working 开发者_StackOverflowtar -pcvf base.tar input/myPacket/my2 --exclude-vcs input/myPacket/my3/*.bmp

I have the following working

开发者_StackOverflowtar -pcvf base.tar input/myPacket/my2 --exclude-vcs input/myPacket/my3/*.bmp

When i have directories with spaces like "input file" then i include the paths in quotes and the include path doesnot work for *.bmp

tar -pcvf base.tar "input file/myPacket/my2" --exclude-vcs "input file/myPacket/my3/*.bmp"

Thanks,


Try this:

tar -pcvf base.tar "input file/myPacket/my2" --exclude-vcs input*file/myPacket/my3/*.bmp

Rather than try to fight the sily spaces within UNIX directories, work around it in the easiest way possible.

0

精彩评论

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