6

I ran cat /dev/zero and it now just hangs whenever I run a cat command. I pressed Ctrl+C to stop that command.

Have I broken something, and how can I fix it?

Tim
  • 33,500

2 Answers2

5

/dev/zero returns infinitely 0-bytes. The process will never end.

You need to identify the cat process and kill it with for example pkill:

pkill -f 'cat /dev/zero'
2

This is likely to be caused by the cat process failing to exit, so to remedy the situation you should make sure that you have killed all cat processes.