View Single Post
Old 12-05-2004, 06:27 PM   #9 (permalink)
section31
Registered User
 
Join Date: Sep 2004
Posts: 35
section31 is on a distinguished road
About my files being .html or .php. I see where you're going. But since I can't figure out a way to enable "extended regular expression" I was unable to do a +*
I could always substitute a ..* for a +* but that still wouldn't achieve what you want because the results from the find return the relative or absolute paths. So I tried doing something like this [^/] .* but for some reason that doesn't match anything.

Oh well, in the meantime this works nearly perfect.
Code:
tar -cvjf backup.tar.bz2 `find . -iregex "..*\.\(html\|php\)"`
Reason i'm doing this is because the only linux box I have access to is my web host, and I'm going use this as a cron job to backup some stuff.

PS:
Cool Linux Reference Site/Book

Last edited by section31; 12-05-2004 at 06:41 PM.
section31 is offline   Reply With Quote