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