mtree -X
    Victor Sudakov 
    vas at mpeks.tomsk.su
       
    Tue Nov  6 11:28:38 UTC 2018
    
    
  
Polytropon wrote:
>On Tue, 6 Nov 2018 09:48:57 +0700, Victor Sudakov wrote:
>> Philipp Vlassakakis wrote:
>> >
>> >./dev works for me
>> >
>> ># cat ignore.mtree
>> >./dev
>> >
>> >then mtree -p / -c -X ignore.mtree > mtree.test
>>
>> Thanks, Philipp, it looks like a directory should start with a "./" and have no
>> trailing slash to be ignored.
>
>Correct. Check "man mtree" for the -X option:
>
>	If the pattern contains a `/' character, it will be
>	matched against entire pathnames (relative to the
>	starting directory); 
So, even if "-p /" is an absolute path, the exclude-file must contain 
a relative path? A bit contra-intuitive, but I can live with that.
> otherwise, it will be matched
>	against basenames only.
>
>Also see "man 3 fnmatch" which discusses the specific
>interpretation of "/" and "*" which applies to the
>exclude list.
Beats me. Can you perhaps quote the relevant part? I still don't 
understand why "./dev/" and "dev/" do not exclude /dev
-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet http://vas.tomsk.ru/
    
    
More information about the freebsd-questions
mailing list