@Wildcard while searching on web, found &> to redirect stdout and stderr. And as we know &> seems also works same, I am planning to post a question for it on U&L
These are called shell operators and yes, there are more of them. I will give a brief overview of the most common among the two major classes, control operators and redirection operators, and how they work with respect to the bash shell.
A. Control operators
These are tokens that perform contr...
I edited an answer on Ask Ubuntu that was suggesting the following
nohup gedit >& /dev/null &
When they actually meant
nohup gedit &> /dev/null &
The latter correctly redirects both stderr and stdout to /dev/null. I was expecting the former to either create a file called & or, more likel...
@Pandya Yes, but it creates foo. That will first run cat rr in the background and then, as an independent command, run > foo which creates foo if it doesn't exist and truncates it if it does.
@Pandya Yes, because that is running cat rr and redirecting both standard error and standard output to the file foo.
exe1 will redirect both standard error and standard output of the command cat xyz into the file foo. The command will be run in the foreground.
exe2 will run the command in the background and won't redirect anything anywhere. After launching the command, it runs a completely separate command: > foo which will truncate the file foo and create it if it doesn't exist.