View Single Post
Old 04-12-2007, 01:39 PM  
scouser
marketer.
 
Industry Role:
Join Date: Aug 2006
Location: bcn
Posts: 2,280
Tar command (unix)

Trying to automate some backing up, but i don't want to back up lots of images, just php files.

This is the best i can come up with, that excludes most main files, but idealy i would like it to ONLY archive php files...:

tar -cf /directory/and/filetoputnewtar.tar /directorytogetfilesfrom/ --exclude=*.pdf --exclude=*.doc --exclude=*.png --exclude=*.jpg --exclude=*.gif --exclude=*.rar --exclude=*.zip --exclude=*cache* --exclude=*logs*


can anyone help? Cheers
scouser is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook