GNU bug report logs -
#78415
documentation: -R v -r difference is not just about symlinks
Previous Next
To reply to this bug, email your comments to 78415 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-grep <at> gnu.org
:
bug#78415
; Package
grep
.
(Wed, 14 May 2025 01:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Matěj Cepl <mcepl <at> cepl.eu>
:
New bug report received and forwarded. Copy sent to
bug-grep <at> gnu.org
.
(Wed, 14 May 2025 01:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
manpage grep(1) describes the difference between -r and -R options thus:
-r, --recursive
Read all files under each directory, recursively, following
symbolic links only if they are on the command line. Note
that if no file operand is given, grep searches the working
directory. This is equivalent to the -d recurse option.
-R, --dereference-recursive
Read all files under each directory, recursively. Follow all
symbolic links, unlike -r.
It seems to me that outside of this advertised difference in
following/non-following symlinks, -R option also makes grep to
search through hidden directories. Is it so? Wouldn’t it be a
good idea to put it into a manpage?
Best,
Matěj Cepl
--
http://matej.ceplovi.cz/blog/, @mcepl <at> en.osm.town
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
“Goodbye,” said the fox. “And now here is my secret, a very
simple secret: It is only with the heart that one can see
rightly; what is essential is invisible to the eye.”
-- Antoine de Saint-Exupery
[E09FEF25D96484AC.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Jim Meyering <jim <at> meyering.net>
:
You have taken responsibility.
(Wed, 14 May 2025 23:00:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Matěj Cepl <mcepl <at> cepl.eu>
:
bug acknowledged by developer.
(Wed, 14 May 2025 23:00:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 78415-done <at> debbugs.gnu.org (full text, mbox):
tags 78415 + notabug
stop
On Tue, May 13, 2025 at 6:58 PM Matěj Cepl <mcepl <at> cepl.eu> wrote:
> manpage grep(1) describes the difference between -r and -R options thus:
>
> -r, --recursive
> Read all files under each directory, recursively, following
> symbolic links only if they are on the command line. Note
> that if no file operand is given, grep searches the working
> directory. This is equivalent to the -d recurse option.
>
> -R, --dereference-recursive
> Read all files under each directory, recursively. Follow all
> symbolic links, unlike -r.
>
> It seems to me that outside of this advertised difference in
> following/non-following symlinks, -R option also makes grep to
> search through hidden directories. Is it so? Wouldn’t it be a
> good idea to put it into a manpage?
Please tell us why you think that.
At least for me, with either -r or -R, grep searches directories whose
names start with ".":
$ mkdir -p .j/.j && cd .j && echo a > .j/a
$ grep -r a
.j/a:a
$ grep -R a
.j/a:a
I'm marking this as done. If you show evidence of a problem, it's easy
to reopen.
Information forwarded
to
bug-grep <at> gnu.org
:
bug#78415
; Package
grep
.
(Thu, 15 May 2025 06:45:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 78415-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed May 14, 2025 at 10:59 PM UTC, Jim Meyering wrote:
> Please tell us why you think that.
> At least for me, with either -r or -R, grep searches directories whose
> names start with ".":
You are right, I was wrong, I am sorry. A sloppy testing.
Have a nice day,
Matěj
--
http://matej.ceplovi.cz/blog/, @mcepl <at> en.osm.town
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
Nemo iudex in causa sua
[E09FEF25D96484AC.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.