unix - Using a regex in GNU tar -
can archive files match regex. example
i have 3 files
./a/b/c/d/file ./a/b/c/d32/file ./a/b/c/d64/file i need archive these two
./a/b/c/d/file ./a/b/c/d32/file something tar -chvzf test.tar.gz a/b/c/d[32]*/file doesn't seem work. there way can using gnu version of tar?
you can this:
tar cvf ff.tar $(ls | grep rb) or if need go deep:
tar cvf my.tar $( find . -type f -name file ) regex unix tar
No comments:
Post a Comment