Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

When I make a simple script, I get "Text File Busy" when I try to run it.

dbell@det-ui-supergbe:~$ cat > test2
[2]+  Stopped                 cat > test2
dbell@det-ui-supergbe:~$ chmod a+x test2
dbell@det-ui-supergbe:~$ ./test2
-bash: ./test2: Text file busy
share|improve this question
up vote 6 down vote accepted

By hitting Ctrl-Z you suspended the cat, therefore the file is still open and being written to "in the background".

I suspect you want Ctrl-D for 'end of file'.

It's true that Ctrl-Z can mean 'EOF', but in this case, because you're in a terminal that supports background tasks, Ctrl-Z means 'suspend'.

Try this link for more information.

share|improve this answer

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.