The command does'nt work because filename are prefixed by the directory path : ./ ... /filename
A solution :
tar . -print | egrep -v '/toto\.|\.bri\.' | cpio -pdvmu
There is a problem with this egrep command.
If your directory contains sub-directory with name starting with toto. or containing .bri. all its files will be ignored :
./test/toto.datas/a.a
./in.bri.new/lulu.txt
Another solution :
tar . -print | egrep -v '\(/toto\.|\.bri\.\)[^/]*$'| cpio -pdvmu
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.