'&' and '&' Symboles
There is no better place then the Newb Channel for a question like that.
In my Crontab file, I have a command that ends with &> /dev/null I understand that basically the /dev/null is there so it produce no output, however, I would like to understand exactly what the '&' and '>' means ? Also, it's really hard to find a information for non Alphanumeric chars on Google. Is there a good Linux site where it would explain what these symbols does ? thanks |
Hello,
Have a look at this. /dev/null is your bitbucket/wastebasket/bin, whatever you want to call it. So basically redirecting (>) to /dev/null is saying you don't want to see it. You can Google for input/output redirection in Linux and it will take you to a lot more detailed information. Or you can read the Bash Beginners Guide. Kind regards, Eric |
So using $ command > dev/null
would be used I don't want to see the standard output and using $ command &> dev/null would be used If I don't want to see the standard output and the error output ? Is that correct ? |
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
I don't know the relevance of "$" in your examples---but it is not related to re-direction. |
Quote:
Quote:
Quote:
|
command1 | command2
sends the stdout of command1 to the stdin of command2 command < file sends the contents of file to command's stdin command > file writes the stdout of command to file, overwriting it's original contents. command 2> file writes the stderr of command to file, overwriting it's original contents. command &> file writes the stdout and stderr of command to file, overwriting it's original contents. command >> file appends the stdout of command to file's original contents. |
Thanks a lot MTK358
If every tutorials were made like that, life would be much more easier ;) that's exactly what I needed. |
The link I provided gave you all of that info---n'est-ce pas?
|
All times are GMT -5. The time now is 09:14 AM. |