GNU bug report logs - #27730
--exclude-dir does ignore subdirectory

Previous Next

Package: grep;

Reported by: Jiří Kozlovský <mail <at> jkozlovsky.cz>

Date: Mon, 17 Jul 2017 06:05:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jiří Kozlovský <mail <at> jkozlovsky.cz>, 27730 <at> debbugs.gnu.org
Subject: bug#27730: --exclude-dir does ignore subdirectory
Date: Mon, 17 Jul 2017 18:03:03 -0700
This does not appear to be a bug, in that grep is operating as documented. When 
searching recursively, --exclude-dir=GLOB will "skip any subdirectory whose base 
name matches GLOB. Ignore any redundant trailing slashes in GLOB." In your case, 
GLOB contains a non-redundant trailing slash, and such a pattern cannot match 
any base name.

To get the behavior that you want, you can use a fancier tool like 'find'.




This bug report was last modified 5 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.