I'm having severe brain fail today.
I want to use tar to create a compressed archive in a file (say backup.gz) starting from a particular directory (say . - the current directory)and storing all files that match a set of patters, recursively. I can do this with a shell script, but I feel as though there should be a simple command line way. I have looked at man tar but can't work it out.
For example this:
tar -cvzf backup.gz *.dat *.glp *.txt
only works with the current dir.
Thanks for looking.
I want to use tar to create a compressed archive in a file (say backup.gz) starting from a particular directory (say . - the current directory)and storing all files that match a set of patters, recursively. I can do this with a shell script, but I feel as though there should be a simple command line way. I have looked at man tar but can't work it out.
For example this:
tar -cvzf backup.gz *.dat *.glp *.txt
only works with the current dir.
Thanks for looking.