There is no file in my directory called a. I used the command "rm a 2>a" to redirect the standard output error to file a. But when I tried the "ls" command, there is no file called a. Can someone explain this?
2>a causes the shell to redirect the standard error stream to a file called
a. This file is created before the command is started.
rm is then executed. It finds a file called
a (already created by the shell) and unlinks it.
a is created bbefore the rm command executes....its as simple as that!