finding every file not in a list

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Wed Jan 27 20:40:00 UTC 2010


"Aryeh M. Friedman" <aryeh.friedman at gmail.com> writes:

> Lowell Gilbert wrote:
>> *not* OT, I would say...
>>
>> "Aryeh M. Friedman" <aryeh.friedman at gmail.com> writes:
>>
>>   
>>> I have a list of files that should be in a dir tree and want to remove
>>> any files from the tree not in list (i.e. if it is on the list keep it
>>> else rm it)... any quick way to do this?
>>>     
>>
>> mtree(8)
>>
>>   
> Tried aelpf -p master | mtree -p ~aegis/master/baseline/" (ignore the
> aelpf it is a command unique to devel/aegis) but got the following:
>
> mtree: line 1: slash character in file name

You'll need to turn the file list into an mtree specification before you
can use it to do this.  Why don't you try one of the other suggestions
(which may be usable as-is)?


-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
		http://be-well.ilk.org/~lowell/


More information about the freebsd-questions mailing list