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