Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If for example I run a command from the terminal like this:

$ find . | xargs grep something

The terminal then goes in a sort of pending state and I can type in characters and whatnot as I wait for the command to start printing stuff to stdout.

What happens with that input? Is it saved somewhere, does it do anything at all? I know I can use it to pass signals to the application (such as SIGINT by way of typing in ^C) but what about some other input? I'm referring specifically to the cases where the application is not prompting the user for input.

Thanks and apologies if this is a bit obvious.

share|improve this question
Just a word of caution: find and xargs are better used with find … -print0 | xargs -0 to overcome issues with spaces or newlines in file names. You'll find that your command won't work for a file called, let's say "foo bar". – slhck Jan 14 '13 at 15:42
Thanks for that, normally on our environment very seldom would a file have a space in it but it's a good habit to start calling it like you've suggested. – Nobilis Jan 14 '13 at 15:46
up vote 6 down vote accepted

Other input is saved in a buffer and is used for the next command in the shell.

share|improve this answer
Sorry, does this mean that while the process executes any rubbish I've typed in (e.g. asdasdekhef) will be passed on to the next command? – Nobilis Jan 14 '13 at 15:45
As John says, the text you paste/write is taken to be a command and is executed once the running process ends. This is very handy when pasting a long list of commands into a terminal since they will be run sequentially. – terdon Jan 14 '13 at 15:47
Thanks, seems like a handy feature to know about :) – Nobilis Jan 14 '13 at 15:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.