LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Broken pipe? (https://www.linuxquestions.org/questions/linux-newbie-8/broken-pipe-353792/)

Nubian 08-16-2005 08:11 AM

Broken pipe?
 
What's a broken pipe error mean and how do you fix it?

All I wanna do is mount a cd in the terminal and it said only root can mount so I try sudo /mnt/cdrom and it asks me Password: so I put mine in and get Broken pipe and the prompt again.

I made a mistake before using the terminal entering in the wrong password a few times and since then I get this Broken pipe thing. How do I fix it?

Nubian 08-16-2005 08:25 AM

Oopsie never mind, my fstab for dev/cdrom was set "owner" not "user" :o But I still wanna know what "Broken pipe" means exactly.

PTrenholme 08-16-2005 08:56 AM

OK, when your command output is used as input to another command, it is "piped" into the command. In the Bourne shell, the usual "pipe" is indicated by a vertical bar. For example, if you wanted to list all files in a directory containing the word "test," you could "pipe" the output of the "ls" command into the "grep" command like this:
Code:

$ ls | grep "test"
Now, once you set that up, both commands must work together. If one fails, then the "pipe" is broken, and the shell gives you the "broken pipe" message.

In your specific case, your command syntax looks strange to me, and you don't mention what distribution you're using. (Hint: Click on "My LQ" at the top of the page and fill out the registration form. Then that information will automatically be displayed with your message in the frame at the left.) But sudo would normally apply to only the first command in a string of commands, and, probably, one of the later commands also needed su to run, so it failed and "broke the pipe."


All times are GMT -5. The time now is 08:28 PM.