August 16th, 2013, 05:04 AM
The ! in your command line is what is causing the issue. To the shell, the ! character has a special meaning, unless you escape it out with \. Try this instead:
In case you're wondering what ! means to the shell: it helps to execute previous commands.
You can view previous commands you typed by typing "history". It will then list all the recent commands you ran, along with numbers listing the various commands e.g.
121 cd /home/foo/bar
122 cp /home/foo/bar/baz /home/foo/somewhere/else.txt
123 ls -al
124 gcc -o foo foo.c
125 emacs /path/to/file.txt
Now say you want to rerun the cp command again. Instead of retyping the whole thing, you can simply type "!122" and the shell will rerun the command. Similarly, if you want to rerun the previous command, you can type "!!". You can also rerun a specific command by typing ! followed by the first few characters of the command. E.g. if you wanted to rerun the gcc command you did earlier, you could simply type "!gcc"
Hence, when the shell saw !/misc/text.c, it looked in your history for a command that you typed earlier that started with /misc/text.c. On not finding any such event, it helpfully reported that "event was not found".
Therefore, if you really want to type a !, you must do it as \!
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
Last edited by Scorpions4ever : August 16th, 2013 at 05:13 AM.