-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Jun 30, 2016 at 06:57:06PM -0400, Gene Heskett wrote: > On Thursday 30 June 2016 16:12:46 Henrique de Moraes Holschuh wrote: > > > grep -r Assume-Yes /etc > > 100% missing here, but lemme see what happens when I use the recursive -R > since I can't ever recall using the lower case r for recursion.
Kids, read the man pages. It's good for you :-) (meant, of course, a bit tongue-in-cheek) (Actually in this case the info page is better, but perhaps too far away from the comfort zone. Grep's man page is excellent). I know man pages are sometimes inscrutable, but *this* is the kind of occassion I always take to learn something: WTF is the difference between -r and -R? After doing this a couple of times one gets a better and better mental map of the documentation. I freely admit I didn't know, but now I do: -R follows (recursively) symbolic links -r follows a symbolic link only if it is the top-level argument But what I wanted to point out is more the "collateral benefit": I am now more acquainted with the landscape in grep's man page, now I know that little shed -r next to the tall tree -R, just past the river, --include=GLOB. And I have paid tribute to the (in the man/info pages) unnamed authors (but one can find out [1]) who gave me such a little jewel. > That took at least 3 or 4 minutes to complete, whereas the -r was back in > 500 milliseconds or so. Big -R should take longer if there are any symlinks in /etc pointing to massive trees elsewhere. That said, do take caching into account. The first grep will tend to take significantly longer. Here's from my box (I elided some warnings because as a user I'm not allowed to nose in every /etc subdirectory After explicitly flushing caches (echo 3 > /proc/sys/vm/drop_caches): tomas@rasputin:~$ time find /etc > /dev/null real 0m0.494s user 0m0.028s sys 0m0.112s tomas@rasputin:~$ time find /etc > /dev/null real 0m0.023s user 0m0.008s sys 0m0.016s That makes for a rough factor of 20 real time. RAM is faster :-) > The only positive response should be a never mind: > > /etc/httpd/lib/python2.7/dist-packages/aptdaemon/console.py: if > (not apt_pkg.config.find_b("APT::Get::Assume-Yes") and I agree with your analysis: this seems irrelevant. No fish in there :-) Regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAld2HtEACgkQBcgs9XrR2kaTnACdERoLNnNzc7WrcmUNUU0Guamn 9ZsAnRORdpBnLhhzW0tcb8TvactWZAgw =+N9O -----END PGP SIGNATURE-----