From owner-freebsd-questions@freebsd.org Tue Nov 6 11:28:38 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B93CC111013D for ; Tue, 6 Nov 2018 11:28:38 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31998724EE for ; Tue, 6 Nov 2018 11:28:28 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from vas by admin.sibptus.ru with local (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gJzWv-000O0V-VV; Tue, 06 Nov 2018 18:28:21 +0700 Date: Tue, 6 Nov 2018 18:28:21 +0700 From: Victor Sudakov To: Polytropon Cc: Philipp Vlassakakis , freebsd-questions@freebsd.org Subject: Re: mtree -X Message-ID: <20181106112821.GB90861@admin.sibptus.ru> References: <20181105170557.GA70617@admin.sibptus.ru> <46C7D1B5-E72A-4874-8C00-1DBC320C00AB@lists.vlassakakis.de> <20181106024857.GA76231@admin.sibptus.ru> <20181106065003.c1081c64.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20181106065003.c1081c64.freebsd@edvax.de> X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Victor Sudakov X-Rspamd-Queue-Id: 31998724EE X-Spamd-Result: default: False [7.64 / 200.00]; ARC_NA(0.00)[]; RSPAMD_URIBL(4.50)[tomsk.ru]; MX_INVALID(0.50)[greylisted]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(0.00)[+mx]; NEURAL_SPAM_SHORT(0.90)[0.901,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[tomsk.su]; TO_DN_SOME(0.00)[]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_MEDIUM(0.96)[0.960,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.69)[0.691,0]; IP_SCORE(0.09)[asn: 20473(0.51), country: US(-0.08)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2]; GREYLIST(0.00)[pass,meta] X-Rspamd-Server: mx1.freebsd.org X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 11:28:38 -0000 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/