Having Trouble Clearing 'sed: read error on stdin: Is a directory' [Solved]

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,757
Reaction score
2,017
Credits
22,463
I've been looking online for about 45 min's trying to find out how to clear this error that stdin is having an issue reading.

Using the removepkg cmd to get rid of the
xfce4-timer-plugin generated this error and I'm not sure what is needed to return back to my bash root prompt.

Code:
sed: read error on stdin: Is a directory

Any ideas guys?
 

Attachments

  • Stdin.png
    Stdin.png
    115.9 KB · Views: 69


It looks like this command:
Code:
root@slackware64:/tmp/SBo# removepkg xfce4-timer-plugin-1.7.1/
is referring to a directory with the "/" at the end, when removepkg is expecting just a package name rather than a directory. The error notes that that's what sed has detected.
 
It looks like this command:
Code:
root@slackware64:/tmp/SBo# removepkg xfce4-timer-plugin-1.7.1/
is referring to a directory with the "/" at the end, when removepkg is expecting just a package name rather than a directory. The error notes that that's what sed has detected.
Thanks, osprey.

The problem is there is a process still running from what sed detected and I'm not able to return to the cmd-line root prompt.
I miss typed the cmd:-

That cmd that I typed should have been:
Ruby:
removepkg xfce4-timer-plugin-1.7.1-x86_64-1_SBo

How would I stop that process?
Use the Kill cmd with it's process?
 
Okay ... makes sense. On the "process still running" which appears to be interrupting things, the question arises as to whether you can identify the PID of that running process by using the output of the ps command, and then kill it? Dunno if that'll help but it came to mind.
 
Okay ... makes sense. On the "process still running" which appears to be interrupting things, the question arises as to whether you can identify the PID of that running process by using the output of the ps command, and then kill it? Dunno if that'll help but it came to mind.
I ran ps aux and I can see all that's running. Unfortunately the Xfce Termianl isn't in the list. Bash is tho--
Found this:
Code:
16549 pts/1    00:00:00 bash

Is that referring to the bash terminal that I have running as root?
 
The ps output for terminals usually shows the process of the terminal, and the process of the shell like this:

Code:
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
<snip>
tom         8824  0.0  0.0  21572 14448 ?        Ss   07:40   0:00 xterm
tom         8826  0.0  0.0   8408  5280 pts/9    Ss+  07:40   0:00 bash
<snip>
where the process numbers of the each process are close to each other, like only one number between the two PIDs in the output. So, all things being well, the terminal type should have a process number too, like xterm does in the above output. Perhaps have a gander with that in mind.
 
Didn't think something so simple could become so trivial!
Killing the root process solved the issue.

Code:
kill 8327  <using su ->


So you can see that there are two output streams, stdout and stderr, and one input stream, stdin. Because error messages and normal output each have their own conduit to carry them to the terminal window, they can be handled independently of one another.

Reading here to see all about stdin, stdout and stderr--

 

Attachments

  • Kill.png
    Kill.png
    117.3 KB · Views: 59
The ps output for terminals usually shows the process of the terminal, and the process of the shell like this:

Code:
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
<snip>
tom         8824  0.0  0.0  21572 14448 ?        Ss   07:40   0:00 xterm
tom         8826  0.0  0.0   8408  5280 pts/9    Ss+  07:40   0:00 bash
<snip>
where the process numbers of the each process are close to each other, like only one number between the two PIDs in the output. So, all things being well, the terminal type should have a process number too, like xterm does in the above output. Perhaps have a gander with that in mind.
Running ps in Slackware doesn't show xterm.
Now that's another question to do some gandering at.
 
Running ps in Slackware doesn't show xterm.
Now that's another question to do some gandering at.
Yes, the ps output would only show xterm if the terminal in use was xterm. In xfce4 the default terminal I believe is xfce4-terminal, but I can't say which terminal was in use.
 
Yes, the ps output would only show xterm if the terminal in use was xterm. In xfce4 the default terminal I believe is xfce4-terminal, but I can't say which terminal was in use.
Right and I agree.
I couldn't find (looked 3 times) xfce4-termianl in any of the output that ps aux kicked out.

I'll add this to the list next time I pm Pat.

Thanks mate for your time and assistance!-:)
 

Members online


Latest posts

Top