Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #16383
| From | Arkadiusz Drabczyk <arkadiusz@domain.invalid> |
|---|---|
| Newsgroups | comp.os.linux.misc, alt.os.linux.debian, alt.os.linux.slackware |
| Subject | Re: mc finds more than `find` finds? |
| Date | 2015-11-28 16:15 +0000 |
| Organization | Daddy, why doesn't this magnet pick up this floppy disk? |
| Message-ID | <n3cjvm$5v8$1@dont-email.me> (permalink) |
| References | <n3at0s$66e$1@dont-email.me> <n3atst$8h6$1@dont-email.me> |
Cross-posted to 3 groups.
On 2015-11-28, William Unruh <unruh@invalid.ca> wrote:
> On 2015-11-28, WhoCares@gmail.com <WhoCares@gmail.com> wrote:
>> I'm still searching for a way to know the pid of eg. the instance of
>> `wily` which is has a certain file open.
>>
>> `pgrep wily` lists all the instances of 'wily'
>>
>> I was hoping that, I'd find which wily has opened file *CONTROL* by:-
>> for PID in `pgrep wily`; do find /proc/$PID -exec grep -l "CONTROL" {} \; >> trace; done
>> --- that's supposed to be ONE line ---
>>
>> Using successive refinement:
>> first I used mc to browse /proc/24357 to find a suitable search target.
>> Obviously "wily" would be there.
>>
>> Then I 'confirmed ?':
>> find /proc/24357 -exec grep "wily" {} \;
>
> You need to escape {} (ie \{\}, or '{}' or the shell will interpret it.
Which shell interprets `{}'? I have never seen one.
>> but that failed, although mc could find several "wily" in /proc/24357
>
> egrep -r would work better than your "find" line
`egrep' is deprecated. From
http://pubs.opengroup.org/onlinepubs/009604499/utilities/grep.html:
"This grep has been enhanced in an upwards-compatible way to provide
the exact functionality of the historical egrep and fgrep commands as
well. It was the clear intention of the standard developers to
consolidate the three greps into a single command."
From `man grep' of GNU grep:
"In addition, the variant programs egrep and fgrep are the same as
grep -E and grep -F, respectively. These variants are deprecated, but
are provided for backward compatibility."
--
Arkadiusz Drabczyk
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mc finds more than `find` finds? WhoCares@gmail.com - 2015-11-28 00:37 +0000
Re: mc finds more than `find` finds? William Unruh <unruh@invalid.ca> - 2015-11-28 00:52 +0000
Re: mc finds more than `find` finds? Arkadiusz Drabczyk <arkadiusz@domain.invalid> - 2015-11-28 16:15 +0000
Re: mc finds more than `find` finds? William Unruh <unruh@invalid.ca> - 2015-11-28 17:59 +0000
Re: mc finds more than `find` finds? Teemu Likonen <tlikonen@iki.fi> - 2015-11-28 20:07 +0200
Re: mc finds more than `find` finds? William Unruh <unruh@invalid.ca> - 2015-11-28 20:44 +0000
Re: mc finds more than `find` finds? Teemu Likonen <tlikonen@iki.fi> - 2015-11-29 12:41 +0200
Re: mc finds more than `find` finds? Arkadiusz Drabczyk <arkadiusz@domain.invalid> - 2015-11-28 18:14 +0000
Re: mc finds more than `find` finds? floyd@apaflo.com (Floyd L. Davidson) - 2015-11-28 11:52 -0900
Re: mc finds more than `find` finds? Martijn Dekker <martijn@inlv.demon.nl> - 2015-11-29 16:35 +0100
Re: mc finds more than `find` finds? floyd@apaflo.com (Floyd L. Davidson) - 2015-11-29 10:49 -0900
Re: mc finds more than `find` finds? Richard Kettlewell <rjk@greenend.org.uk> - 2015-11-29 20:24 +0000
Re: mc finds more than `find` finds? floyd@apaflo.com (Floyd L. Davidson) - 2015-11-29 14:09 -0900
Re: mc finds more than `find` finds? Richard Kettlewell <rjk@greenend.org.uk> - 2015-11-30 09:24 +0000
Re: mc finds more than `find` finds? Eef Hartman <E.J.M.Hartman@gmail.com> - 2015-11-30 10:08 +0000
Re: mc finds more than `find` finds? William Unruh <unruh@invalid.ca> - 2015-11-29 20:07 +0000
Re: mc finds more than `find` finds? Eef Hartman <E.J.M.Hartman@gmail.com> - 2015-11-29 20:10 +0000
Re: mc finds more than `find` finds? no.top.post@gmail.com - 2016-01-04 23:07 +0000
Re: mc finds more than `find` finds? The Natural Philosopher <tnp@invalid.invalid> - 2016-01-04 23:27 +0000
Re: mc finds more than `find` finds? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2016-01-04 19:28 -0500
Re: mc finds more than `find` finds? The Natural Philosopher <tnp@invalid.invalid> - 2016-01-05 14:04 +0000
Re: mc finds more than `find` finds? Richard Kettlewell <rjk@greenend.org.uk> - 2016-01-05 18:12 +0000
Re: mc finds more than `find` finds? Jerry Peters <jerry@example.invalid> - 2016-01-05 21:05 +0000
Re: mc finds more than `find` finds? marrgol <marrgol@address.invalid> - 2015-11-28 02:22 +0100
Re: mc finds more than `find` finds? Joe Beanfish <joebeanfish@nospam.duh> - 2015-11-30 15:59 +0000
Re: mc finds more than `find` finds? Unknown <dog@gmail.com> - 2016-01-03 12:52 +0000
csiph-web