public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] empty cdrom drive is busy or mounted
@ 2019-08-16 14:23 Helmut Jarausch
  2019-08-16 15:22 ` J. Roeleveld
  2019-08-16 15:25 ` Jack
  0 siblings, 2 replies; 18+ messages in thread
From: Helmut Jarausch @ 2019-08-16 14:23 UTC (permalink / raw
  To: gentoo-user

Hi,

I have a very strange effect on my Gentoo system.
First, I've check that /dev/sr0 points to the correct device (from  
dmesg)

For an empty drive  I get

1 # mount /dev/sr0 /cdrom
mount: /cdrom: /dev/sr0 already mounted or mount point busy.

2 # lsof /dev/sr0

3 # umount /dev/sr0
umount: /dev/sr0: not mounted.


Does anybody know what's going on here?

Many thanks for a hint.

P.S. I have checked this with two physically different drives.




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 14:23 [gentoo-user] empty cdrom drive is busy or mounted Helmut Jarausch
@ 2019-08-16 15:22 ` J. Roeleveld
  2019-08-16 15:24   ` Helmut Jarausch
  2019-08-16 15:25 ` Jack
  1 sibling, 1 reply; 18+ messages in thread
From: J. Roeleveld @ 2019-08-16 15:22 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Sounds like error message is not clear. But as there is no disc, the mount action should fail anyway.
What happens when there is a disc in the drive?

--
Joost

On 16 August 2019 16:23:36 CEST, Helmut Jarausch <jarausch@skynet.be> wrote:
>Hi,
>
>I have a very strange effect on my Gentoo system.
>First, I've check that /dev/sr0 points to the correct device (from  
>dmesg)
>
>For an empty drive  I get
>
>1 # mount /dev/sr0 /cdrom
>mount: /cdrom: /dev/sr0 already mounted or mount point busy.
>
>2 # lsof /dev/sr0
>
>3 # umount /dev/sr0
>umount: /dev/sr0: not mounted.
>
>
>Does anybody know what's going on here?
>
>Many thanks for a hint.
>
>P.S. I have checked this with two physically different drives.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[-- Attachment #2: Type: text/html, Size: 1106 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 15:22 ` J. Roeleveld
@ 2019-08-16 15:24   ` Helmut Jarausch
  0 siblings, 0 replies; 18+ messages in thread
From: Helmut Jarausch @ 2019-08-16 15:24 UTC (permalink / raw
  To: gentoo-user

On 08/16/2019 05:22:27 PM, J. Roeleveld wrote:
> Sounds like error message is not clear. But as there is no disc, the  
> mount
> action should fail anyway.
> What happens when there is a disc in the drive?

The same unfortunately.
Thanks,
Helmut

> 
> --
> Joost
> 
> On 16 August 2019 16:23:36 CEST, Helmut Jarausch  
> &lt;jarausch@skynet.be&gt;
> wrote:
>      Hi,
> 
>      I have a very strange effect on my Gentoo system.
>      First, I've check that /dev/sr0 points to the correct device  
> (from
>      dmesg)
> 
>      For an empty drive  I get
> 
>      1 # mount /dev/sr0 /cdrom
>      mount: /cdrom: /dev/sr0 already mounted or mount point busy.
> 
>      2 # lsof /dev/sr0
> 
>      3 # umount /dev/sr0
>      umount: /dev/sr0: not mounted.
> 
> 
>      Does anybody know what's going on here?
> 
>      Many thanks for a hint.
> 
>      P.S. I have checked this with two physically different drives.
> 
> 
> 
> 
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 14:23 [gentoo-user] empty cdrom drive is busy or mounted Helmut Jarausch
  2019-08-16 15:22 ` J. Roeleveld
@ 2019-08-16 15:25 ` Jack
  2019-08-16 16:00   ` Helmut Jarausch
  2019-08-16 16:26   ` [gentoo-user] empty cdrom drive is busy or mounted Helmut Jarausch
  1 sibling, 2 replies; 18+ messages in thread
From: Jack @ 2019-08-16 15:25 UTC (permalink / raw
  To: gentoo-user

try "lsof /cdrom"?  It says the mount point, not the device, might be busy.

On 8/16/19 10:23 AM, Helmut Jarausch wrote:
> Hi,
>
> I have a very strange effect on my Gentoo system.
> First, I've check that /dev/sr0 points to the correct device (from dmesg)
>
> For an empty drive  I get
>
> 1 # mount /dev/sr0 /cdrom
> mount: /cdrom: /dev/sr0 already mounted or mount point busy.
>
> 2 # lsof /dev/sr0
>
> 3 # umount /dev/sr0
> umount: /dev/sr0: not mounted.
>
>
> Does anybody know what's going on here?
>
> Many thanks for a hint.
>
> P.S. I have checked this with two physically different drives.
>
>
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 15:25 ` Jack
@ 2019-08-16 16:00   ` Helmut Jarausch
  2019-08-16 16:21     ` Jack
  2019-08-16 16:26   ` [gentoo-user] empty cdrom drive is busy or mounted Helmut Jarausch
  1 sibling, 1 reply; 18+ messages in thread
From: Helmut Jarausch @ 2019-08-16 16:00 UTC (permalink / raw
  To: gentoo-user

On 08/16/2019 05:25:34 PM, Jack wrote:
> try "lsof /cdrom"?  It says the mount point, not the device, might be  
> busy.


This didn't show anything.
I still don't know the cause of my problems.
But fortunately, they have been resolved by recompiling the kernel  
(5.2.0),
systemd and all packages depending on systemd - using the new gcc-9.2.0

Furthermore I had to add the use flags
cgroup-hybrid -sysv-utils
for systemd. This hasn't been necessary before - very strange.
For me, systemd is a monster which I haven't understood.
I try to not use it since I am using openrc.
Perhaps I have to remove it from my system and use eudev instead of  
udev as part of systemd.

Thanks for trying to help me - it was a really strange situation.

> On 8/16/19 10:23 AM, Helmut Jarausch wrote:
>> Hi,
>> 
>> I have a very strange effect on my Gentoo system.
>> First, I've check that /dev/sr0 points to the correct device (from  
>> dmesg)
>> 
>> For an empty drive  I get
>> 
>> 1 # mount /dev/sr0 /cdrom
>> mount: /cdrom: /dev/sr0 already mounted or mount point busy.
>> 
>> 2 # lsof /dev/sr0
>> 
>> 3 # umount /dev/sr0
>> umount: /dev/sr0: not mounted.
>> 
>> 
>> Does anybody know what's going on here?
>> 
>> Many thanks for a hint.
>> 
>> P.S. I have checked this with two physically different drives.
>> 
>> 
>> 
> 
> 


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 16:00   ` Helmut Jarausch
@ 2019-08-16 16:21     ` Jack
  2019-08-16 17:47       ` [EXTERNAL] " Laurence Perkins
  2019-08-18 13:25       ` [gentoo-user] empty cdrom drive is busy or mounted [resolved] Helmut Jarausch
  0 siblings, 2 replies; 18+ messages in thread
From: Jack @ 2019-08-16 16:21 UTC (permalink / raw
  To: gentoo-user

On 2019.08.16 12:00, Helmut Jarausch wrote:
> On 08/16/2019 05:25:34 PM, Jack wrote:
>> try "lsof /cdrom"?  It says the mount point, not the device, might  
>> be busy.
> 
> 
> This didn't show anything.
> I still don't know the cause of my problems.
> But fortunately, they have been resolved by recompiling the kernel  
> (5.2.0),
> systemd and all packages depending on systemd - using the new  
> gcc-9.2.0
> 
> Furthermore I had to add the use flags
> cgroup-hybrid -sysv-utils
> for systemd. This hasn't been necessary before - very strange.
> For me, systemd is a monster which I haven't understood.
> I try to not use it since I am using openrc.
> Perhaps I have to remove it from my system and use eudev instead of  
> udev as part of systemd.
> 
> Thanks for trying to help me - it was a really strange situation.

If you are using openrc (as I am) I would say you really don't want  
systemd installed at all.  I can't imagine any good coming from that.   
You do need eudev,  I also have elogind installed, but I'm not sure if  
it's absolutely required, or if I had some other reason for installing  
(possibly to get rid of consolekit?)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 15:25 ` Jack
  2019-08-16 16:00   ` Helmut Jarausch
@ 2019-08-16 16:26   ` Helmut Jarausch
  2019-08-16 16:44     ` Jack
  1 sibling, 1 reply; 18+ messages in thread
From: Helmut Jarausch @ 2019-08-16 16:26 UTC (permalink / raw
  To: gentoo-user

On 08/16/2019 05:25:34 PM, Jack wrote:
> try "lsof /cdrom"?  It says the mount point, not the device, might be  
> busy.

Unfortunately, the problem is still there.

dmesg shows

[ 1326.461161] systemd-udevd[9882]: Process 'cdrom_id --eject-media  
/dev/sr0' failed with exit code 1.


But does that mean?


> On 8/16/19 10:23 AM, Helmut Jarausch wrote:
>> Hi,
>> 
>> I have a very strange effect on my Gentoo system.
>> First, I've check that /dev/sr0 points to the correct device (from  
>> dmesg)
>> 
>> For an empty drive  I get
>> 
>> 1 # mount /dev/sr0 /cdrom
>> mount: /cdrom: /dev/sr0 already mounted or mount point busy.
>> 
>> 2 # lsof /dev/sr0
>> 
>> 3 # umount /dev/sr0
>> umount: /dev/sr0: not mounted.
>> 
>> 
>> Does anybody know what's going on here?
>> 
>> Many thanks for a hint.
>> 
>> P.S. I have checked this with two physically different drives.
>> 
>> 
>> 
> 
> 


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 16:26   ` [gentoo-user] empty cdrom drive is busy or mounted Helmut Jarausch
@ 2019-08-16 16:44     ` Jack
  2019-08-21 19:48       ` james
  0 siblings, 1 reply; 18+ messages in thread
From: Jack @ 2019-08-16 16:44 UTC (permalink / raw
  To: gentoo-user

On 2019.08.16 12:26, Helmut Jarausch wrote:
> On 08/16/2019 05:25:34 PM, Jack wrote:
>> try "lsof /cdrom"?  It says the mount point, not the device, might  
>> be busy.
> 
> Unfortunately, the problem is still there.
> 
> dmesg shows
> 
> [ 1326.461161] systemd-udevd[9882]: Process 'cdrom_id --eject-media  
> /dev/sr0' failed with exit code 1.
> 
> 
> But does that mean?
My guess is that you have not fully purged your system of systemd.  I  
have a few dmesg entries from udevd, but nothing that mentions  
systemd.  Does "ps auxf | grep systemd" show anything?  It does not for  
me.

Does "eix systemd" show anything installed?  It does not for me.  There  
is also a setting in the kernel config (at the very bottom) about  
whether you use openrc or systemd, but I use gentoo-sources, and  
suspect that's a gentoo addition that probably controls some other  
settings.  It looks like they just enable all other setting necessary  
for either the script based inits (including openrc) or for systemd, so  
it looks like it would be safe to have both set.

Jack

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [EXTERNAL] Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 16:21     ` Jack
@ 2019-08-16 17:47       ` Laurence Perkins
  2019-08-18 13:25       ` [gentoo-user] empty cdrom drive is busy or mounted [resolved] Helmut Jarausch
  1 sibling, 0 replies; 18+ messages in thread
From: Laurence Perkins @ 2019-08-16 17:47 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]



On Fri, 2019-08-16 at 12:21 -0400, Jack wrote:
> On 2019.08.16 12:00, Helmut Jarausch wrote:
> > On 08/16/2019 05:25:34 PM, Jack wrote:
> > > try "lsof /cdrom"?  It says the mount point, not the device,
> > > might  
> > > be busy.
> > 
> > This didn't show anything.
> > I still don't know the cause of my problems.
> > But fortunately, they have been resolved by recompiling the
> > kernel  
> > (5.2.0),
> > systemd and all packages depending on systemd - using the new  
> > gcc-9.2.0
> > 
> > Furthermore I had to add the use flags
> > cgroup-hybrid -sysv-utils
> > for systemd. This hasn't been necessary before - very strange.
> > For me, systemd is a monster which I haven't understood.
> > I try to not use it since I am using openrc.
> > Perhaps I have to remove it from my system and use eudev instead
> > of  
> > udev as part of systemd.
> > 
> > Thanks for trying to help me - it was a really strange situation.
> 
> If you are using openrc (as I am) I would say you really don't want  
> systemd installed at all.  I can't imagine any good coming from
> that.   
> You do need eudev,  I also have elogind installed, but I'm not sure
> if  
> it's absolutely required, or if I had some other reason for
> installing  
> (possibly to get rid of consolekit?)

elogind will be needed if you have one of the desktop environments or
login managers that relies on it, and yeah, it mostly just takes the
place of console kit with regard to giving the user who is actually
sitting at the keyboard extra privileges.

LMP

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted [resolved]
  2019-08-16 16:21     ` Jack
  2019-08-16 17:47       ` [EXTERNAL] " Laurence Perkins
@ 2019-08-18 13:25       ` Helmut Jarausch
  1 sibling, 0 replies; 18+ messages in thread
From: Helmut Jarausch @ 2019-08-18 13:25 UTC (permalink / raw
  To: gentoo-user

On 08/16/2019 06:21:30 PM, Jack wrote:
> On 2019.08.16 12:00, Helmut Jarausch wrote:
>> On 08/16/2019 05:25:34 PM, Jack wrote:
>>> try "lsof /cdrom"?  It says the mount point, not the device, might  
>>> be busy.
>> 
>> 
>> This didn't show anything.
>> I still don't know the cause of my problems.
>> But fortunately, they have been resolved by recompiling the kernel  
>> (5.2.0),
>> systemd and all packages depending on systemd - using the new  
>> gcc-9.2.0
>> 
>> Furthermore I had to add the use flags
>> cgroup-hybrid -sysv-utils
>> for systemd. This hasn't been necessary before - very strange.
>> For me, systemd is a monster which I haven't understood.
>> I try to not use it since I am using openrc.
>> Perhaps I have to remove it from my system and use eudev instead of  
>> udev as part of systemd.
>> 
>> Thanks for trying to help me - it was a really strange situation.
> 
> If you are using openrc (as I am) I would say you really don't want  
> systemd installed at all.  I can't imagine any good coming from  
> that.  You do need eudev,  I also have elogind installed, but I'm not  
> sure if it's absolutely required, or if I had some other reason for  
> installing (possibly to get rid of consolekit?)


Thank you Jack and Laurence!

I've put the (possibly dangerous) task to get rid of systemd on my  
to-do list.
Meanwhile, the issue is resolved here - most probably because I  
uninstalled
sys-fs/udiskie. (Less likely because I upgraded the kernel from 5.2.8  
to 5.2.9)

Many thanks again,
Helmut

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-16 16:44     ` Jack
@ 2019-08-21 19:48       ` james
  2019-08-21 22:58         ` Jack
  2019-08-22  0:03         ` Adam Carter
  0 siblings, 2 replies; 18+ messages in thread
From: james @ 2019-08-21 19:48 UTC (permalink / raw
  To: gentoo-user

On 8/16/19 12:44 PM, Jack wrote:
> ps auxf | grep systemd



This is new turf for me. Upon issuing this command string I get::


# ps auxf | grep systemd
root     24947  0.0  0.0  13964   996 pts/6    S+   15:43   0:00
          |   |   |           \_ grep --colour=auto systemd



I have no clue what this means, nor what action, if any I should take
to remedy this. I have never used systemd and put up/modify everything I
can to keeep systemd off. Any explaination or advice, like a master list
of things/configs to ensure nothing 'systemd related' in on the system,
is most welcome.


Just a note: I've been in poor health, over the last 2 years, so excuse
my lack of keeping my gentoo system(s) robustly updated.



James



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-21 19:48       ` james
@ 2019-08-21 22:58         ` Jack
  2019-08-22  0:03         ` Adam Carter
  1 sibling, 0 replies; 18+ messages in thread
From: Jack @ 2019-08-21 22:58 UTC (permalink / raw
  To: gentoo-user

On 2019.08.21 15:48, james wrote:
> On 8/16/19 12:44 PM, Jack wrote:
> > ps auxf | grep systemd
> 
> This is new turf for me. Upon issuing this command string I get::
> 
> # ps auxf | grep systemd
> root     24947  0.0  0.0  13964   996 pts/6    S+   15:43   0:00
>           |   |   |           \_ grep --colour=auto systemd
This just means that there is nothing else running on your system with  
"systemd" in the name.
> 
> I have no clue what this means, nor what action, if any I should take  
> to remedy this. I have never used systemd and put up/modify  
> everything I can to keeep systemd off. Any explaination or advice,  
> like a master list of things/configs to ensure nothing 'systemd  
> related' in on the system, is most welcome.
Sorry, but you came into the middle of a conversation started by  
someone else, and all suggestions provided were directed primarily at  
him.  What is the "this" you think you need to remedy?

In the case of the original poster to this thread, he was not using  
systemd, but did have it installed, so I suggested that ps command to  
see if any part of systemd was running on his system, even though he  
didn't think there was.

In your case, if you have never installed systemd, then you should not  
have anything to worry about.  While many of us might call it  
"intrusive," as far as I know, it does not have the ability to actually  
install itself without you knowing about it.  If you have eix  
installed, you could even do "eix systemd" to confirm you don't have  
any of it's pieces installed.
> 
> Just a note: I've been in poor health, over the last 2 years, so  
> excuse my lack of keeping my gentoo system(s) robustly updated.
Not updating your system may make it difficult to do once you are  
ready, but it does  not change the state of what you do or do not have  
installed or running.  If you need help when you DO try to update, just  
start a new thread with an appropriate  subject, and there are plenty  
of folks who will offer advice.
> 
> James
Jack

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-21 19:48       ` james
  2019-08-21 22:58         ` Jack
@ 2019-08-22  0:03         ` Adam Carter
  2019-08-22 16:31           ` [EXTERNAL] " Laurence Perkins
  1 sibling, 1 reply; 18+ messages in thread
From: Adam Carter @ 2019-08-22  0:03 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

On Thu, Aug 22, 2019 at 5:48 AM james <garftd@verizon.net> wrote:

> On 8/16/19 12:44 PM, Jack wrote:
> > ps auxf | grep systemd
>
> This is new turf for me. Upon issuing this command string I get::
>
> # ps auxf | grep systemd
> root     24947  0.0  0.0  13964   996 pts/6    S+   15:43   0:00
>           |   |   |           \_ grep --colour=auto systemd
>

This is showing that the only process with systemd in its name is the grep
command itself; you could pass anything to grep and it will be found in the
process list, eg;

$ ps auxf | grep blah
adam       52359  0.0  0.0   7708   940 pts/3    S+   09:55   0:00      \_
grep --colour=auto blah

So, there's no systemd process running on this system.

[-- Attachment #2: Type: text/html, Size: 1144 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [EXTERNAL] Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-22  0:03         ` Adam Carter
@ 2019-08-22 16:31           ` Laurence Perkins
  2019-08-22 16:52             ` Jack
  2019-08-23  2:08             ` [EXTERNAL] " Andrew Udvare
  0 siblings, 2 replies; 18+ messages in thread
From: Laurence Perkins @ 2019-08-22 16:31 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]



On Thu, 2019-08-22 at 10:03 +1000, Adam Carter wrote:
> On Thu, Aug 22, 2019 at 5:48 AM james <garftd@verizon.net> wrote:
> > On 8/16/19 12:44 PM, Jack wrote:
> > > ps auxf | grep systemd
> > 
> > This is new turf for me. Upon issuing this command string I get::
> > 
> > # ps auxf | grep systemd
> > root     24947  0.0  0.0  13964   996 pts/6    S+   15:43   0:00
> >           |   |   |           \_ grep --colour=auto systemd
> > 
> 
> This is showing that the only process with systemd in its name is the
> grep command itself; you could pass anything to grep and it will be
> found in the process list, eg;
> 
> $ ps auxf | grep blah
> adam       52359  0.0  0.0   7708   940 pts/3    S+   09:55   0:00  
>    \_ grep --colour=auto blah
> 
> So, there's no systemd process running on this system.

A common tactic is to use grep twice:
ps auxf | grep -v grep | grep blah

That strips out all instances of grep from the results.
Putting what you're searching for first is more efficient, but putting
it last keeps the colorized output intact.

LMP

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [EXTERNAL] Re: [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-22 16:31           ` [EXTERNAL] " Laurence Perkins
@ 2019-08-22 16:52             ` Jack
  2019-08-23  2:08             ` [EXTERNAL] " Andrew Udvare
  1 sibling, 0 replies; 18+ messages in thread
From: Jack @ 2019-08-22 16:52 UTC (permalink / raw
  To: gentoo-user

On 2019.08.22 12:31, Laurence Perkins wrote:
> 
> 
> On Thu, 2019-08-22 at 10:03 +1000, Adam Carter wrote:
> > On Thu, Aug 22, 2019 at 5:48 AM james <garftd@verizon.net> wrote:
> > > On 8/16/19 12:44 PM, Jack wrote:
> > > > ps auxf | grep systemd
> > >
> > > This is new turf for me. Upon issuing this command string I get::
> > >
> > > # ps auxf | grep systemd
> > > root     24947  0.0  0.0  13964   996 pts/6    S+   15:43   0:00
> > >           |   |   |           \_ grep --colour=auto systemd
> > >
> >
> > This is showing that the only process with systemd in its name is  
> the
> > grep command itself; you could pass anything to grep and it will be
> > found in the process list, eg;
> >
> > $ ps auxf | grep blah
> > adam       52359  0.0  0.0   7708   940 pts/3    S+   09:55   0:00
> >    \_ grep --colour=auto blah
> >
> > So, there's no systemd process running on this system.
> 
> A common tactic is to use grep twice:
> ps auxf | grep -v grep | grep blah
> 
> That strips out all instances of grep from the results.
> Putting what you're searching for first is more efficient, but putting
> it last keeps the colorized output intact.
> 
> LMP
I often deal with that by using the search function in my terminal  
(usually konsole) to highlight the term I'm actually looking for.
> 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [EXTERNAL] [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-22 16:31           ` [EXTERNAL] " Laurence Perkins
  2019-08-22 16:52             ` Jack
@ 2019-08-23  2:08             ` Andrew Udvare
  2019-08-23 21:21               ` Neil Bothwick
  1 sibling, 1 reply; 18+ messages in thread
From: Andrew Udvare @ 2019-08-23  2:08 UTC (permalink / raw
  To: gentoo-user


> On 2019-08-22, at 12:31, Laurence Perkins <lperkins@openeye.net> wrote:
> 
> A common tactic is to use grep twice:
> ps auxf | grep -v grep | grep blah

Or grep with brackets:

ps aux | grep '[f]irefox'

I have a function for this:

psgrep() {
  ps aux | grep "[${1:0:1}]${1:1}";
}

This works because the ps output will have "grep [f]irefox" and the regex can't match that line (without escaping the [] again).


-- 
Andrew

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [EXTERNAL] [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-23  2:08             ` [EXTERNAL] " Andrew Udvare
@ 2019-08-23 21:21               ` Neil Bothwick
  2019-08-23 23:53                 ` james
  0 siblings, 1 reply; 18+ messages in thread
From: Neil Bothwick @ 2019-08-23 21:21 UTC (permalink / raw
  To: gentoo-user

On 22 August 2019 22:08:41 GMT-04:00, Andrew Udvare <audvare@gmail.com> wrote:
>
>> On 2019-08-22, at 12:31, Laurence Perkins <lperkins@openeye.net>
>wrote:
>> 
>> A common tactic is to use grep twice:
>> ps auxf | grep -v grep | grep blah
>
>Or grep with brackets:
>
>ps aux | grep '[f]irefox'
>
>I have a function for this:
>
>psgrep() {
>  ps aux | grep "[${1:0:1}]${1:1}";
>}
>
>This works because the ps output will have "grep [f]irefox" and the
>regex can't match that line (without escaping the [] again).

Or just use pgrep, I usually use pgrep - fa. 
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [EXTERNAL] [gentoo-user] empty cdrom drive is busy or mounted
  2019-08-23 21:21               ` Neil Bothwick
@ 2019-08-23 23:53                 ` james
  0 siblings, 0 replies; 18+ messages in thread
From: james @ 2019-08-23 23:53 UTC (permalink / raw
  To: gentoo-user

On 8/23/19 5:21 PM, Neil Bothwick wrote:
> On 22 August 2019 22:08:41 GMT-04:00, Andrew Udvare <audvare@gmail.com> wrote:
>>
>>> On 2019-08-22, at 12:31, Laurence Perkins <lperkins@openeye.net>
>> wrote:
>>>
>>> A common tactic is to use grep twice:
>>> ps auxf | grep -v grep | grep blah
>>
>> Or grep with brackets:
>>
>> ps aux | grep '[f]irefox'
>>
>> I have a function for this:
>>
>> psgrep() {
>>  ps aux | grep "[${1:0:1}]${1:1}";
>> }
>>
>> This works because the ps output will have "grep [f]irefox" and the
>> regex can't match that line (without escaping the [] again).
> 
> Or just use pgrep, I usually use pgrep - fa. 
> 

Ah, that is what I was looking for

thx,
James


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-08-23 23:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-16 14:23 [gentoo-user] empty cdrom drive is busy or mounted Helmut Jarausch
2019-08-16 15:22 ` J. Roeleveld
2019-08-16 15:24   ` Helmut Jarausch
2019-08-16 15:25 ` Jack
2019-08-16 16:00   ` Helmut Jarausch
2019-08-16 16:21     ` Jack
2019-08-16 17:47       ` [EXTERNAL] " Laurence Perkins
2019-08-18 13:25       ` [gentoo-user] empty cdrom drive is busy or mounted [resolved] Helmut Jarausch
2019-08-16 16:26   ` [gentoo-user] empty cdrom drive is busy or mounted Helmut Jarausch
2019-08-16 16:44     ` Jack
2019-08-21 19:48       ` james
2019-08-21 22:58         ` Jack
2019-08-22  0:03         ` Adam Carter
2019-08-22 16:31           ` [EXTERNAL] " Laurence Perkins
2019-08-22 16:52             ` Jack
2019-08-23  2:08             ` [EXTERNAL] " Andrew Udvare
2019-08-23 21:21               ` Neil Bothwick
2019-08-23 23:53                 ` james

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox