1

How to tar files of different extensions in one command

view story
linux-howto

http://www.unix.com – Linux RHEL 5.4 It is easy to create a tarball when you have files same extension For eg: You want to tar all files with the extension .log . This is easy Code: tar -cvf diagnose.tar *.log I have two files with different extensions .log and .sh : Code: error.log myscript.sh I want to create a single tarfile named diagnose.tar from these 2 files. Attempt 1 Code: # Trying to use commas to specify multiple files $ tar -cvf diagnose.tar error.log,myscript.sh tar: error.log,myscript.sh: Cannot stat: No such file or directory tar: Error exit delayed from previous errors Attemp (HowTos)