Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Tar up, excluding common media extensions (See related posts)

Just the code, please! Hop in the dir you want to back up (note: this means it'll expand without a base directory, so do a mkdir/cd first!)

find . ! -type d -print | egrep '/,|%$|~$|\.old$|\.mpg$|\.zip$|\.wmv$|\.mp3$|\.MP3$|\.mp4$|\.MP4$|\.av2$|\.ppt$|\.dir$|\.pps$|\.qt$|SCCS|/core$|\.o$|\.orig$|\.mpeg$|\.mov$|\.doc$|\.xls$|\.pdf$|\.swf$|\.fla$|\.wav$|\.aif$|\.aiff$|\.mp3$|\.jpg$|\.JPG$|\.jpeg$|\.JPEG$|\.gif$|\.GIF$|\.png$|\.PNG$|\.psd$|\.PSD$|\.tar.gz$|\.tgz$|\.TGZ$|\.tif$|\.TIF$|\.tiff$|\.TIFF$|\.tga$|\.TGA$|\.ram$|\.rm$|\.rma$|\.psd$|\.PSD$|\.ai$|\.AI$' > Exclude
tar czfvX ~/backup_text_back.tgz Exclude .

You need to create an account or log in to post comments to this site.


Related Posts