tar cvf xxx.tar `find yyy -name '*.dat' -print`Originally posted by johnkumar
Need some help.
In Unix, I need to "tar" directories/sub-directories and also filter the files within these directories/sub-directories, say *.dat (dat files only).
Originally posted by johnkumar
This Command ran successfully but for some reason It did not pick all the files
find . -name '*3011894*' -print | xargs tar -cvf tarfile.tar
This command give be error...
tar -cvf tarfile.tar 'find . -name '*3011894*' -print'
tar: find . -name *3011894* -print: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
Thanks for your Help.