Tar command (unix)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scouser
    marketer.
    • Aug 2006
    • 2280

    #1

    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
Working...