Date: Tue, 6 Nov 2018 18:28:21 +0700 From: Victor Sudakov <vas@mpeks.tomsk.su> To: Polytropon <freebsd@edvax.de> Cc: Philipp Vlassakakis <freebsd-en@lists.vlassakakis.de>, freebsd-questions@freebsd.org Subject: Re: mtree -X Message-ID: <20181106112821.GB90861@admin.sibptus.ru> In-Reply-To: <20181106065003.c1081c64.freebsd@edvax.de> References: <20181105170557.GA70617@admin.sibptus.ru> <46C7D1B5-E72A-4874-8C00-1DBC320C00AB@lists.vlassakakis.de> <20181106024857.GA76231@admin.sibptus.ru> <20181106065003.c1081c64.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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@fidonet http://vas.tomsk.ru/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181106112821.GB90861>