On Wed, 2003-11-19 at 00:11, Richard Esplin wrote: > grep -v will do an invert match, only returning the files that don't contain > the specified strings. You could then send that list to cp to make your > backups (make sure to use the -p flag to preserve permissions). > But unison is a tool that will do exactly what you want. If you put your list > of files in the ignore list in your preferences file, then unison will never > touch them. unison has a lot of other features too, so perhaps it is overkill > for your purposes.
Good idea. Furthermore, though, you should probably be using egrep, not grep, since it does regular expressions. Michael > Richard Esplin > > On Tuesday 18 November 2003 23:24, Richard Miller wrote: > > I want to backup my Home directory but there are some files that I just > > don't need to backup so I have compiled a list in "excludelist.txt". > > I'm not a pro with Regular expressions, but I've learned that I can > > type a command like this > > > > $ find ~ | grep -f excludelist.txt > > > > to show the all the files I want to exclude. > > > > How do I, on the other hand, use the exclude list to show all of the > > files I want to INCLUDE? > > > > > > Actually, I don't know what I will do with a list of the files I want > > to include, but there ought to be a way to backup those files once I > > have a list. Am I heading in the right direction? > > > > Thanks! > > > > Richard Miller > > > > > > ____________________ > > BYU Unix Users Group > > http://uug.byu.edu/ > > ___________________________________________________________________ > > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list > > > ____________________ > BYU Unix Users Group > http://uug.byu.edu/ > ___________________________________________________________________ > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list -- Michael Torrie <[EMAIL PROTECTED]> ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
