1

I have installed fedora 23 and this error happened when i want to use grep in su mode user :

[root@alifed alireza]# ps aux |‌ grep dnf
 bash: ‌: command not found...
0
6

You, weirdly, have a Unicode formatting character 200C, "zero width non-joiner", after the | in your command.

Where did you get this example from? I assume you are copying and pasting it directly from some documentation, and for some reason this odd formatting character got in there — I'm not sure exactly why, as I can't think of a good reason.

The error bash is giving you is literally correct. With the character replaced with a visible representation, the error becomes obvious:

[root@alifed alireza]# ps aux |200C grep dnf
bash: 200C: command not found...

The shell thinks that you're piping the output of ps aux to a command named that unprintable character with grep dnf as arguments. But, of course, there is no command by that name, so it tells you so.

Why did I suspect that this was the problem? Because bash's normal error syntax is

$ noncommand
bash: noncommand: command not found...

and in the error you reported, there's a blank where the missing command should be. If ps or grep were missing, it'd tell you bash: ps: command not found or bash: grep: command not found. And, since you pasted the exact command and error into your question instead of retyping it (awesome — always the best practice!) I was able to examine the results and replicate. (This happens as non-root, too, by the way — the su thing is a red herring.)

3
  • the funny thing about this problem is that i write both commands in root and non-root user with same keyboard !! and error happened with root user ! now, what is the solution ? thx – alireza Oct 2 '15 at 15:55
  • Now that's interesting. You're actually typing this rather than cutting and pasting? Is this in a terminal in the GUI, or at the text console prompt. It may be that there's a language/locale bug. – mattdm Oct 2 '15 at 16:33
  • tinypic.com/r/2v96bg2/8 gnome-terminal interface in gnome3, interesting thing that now i tested command in non-root user randomly had error !! i do not know what is happen !! – alireza Oct 2 '15 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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