bash - How to understand this redirection command? -
this question has answer here:
- in shell, “ 2>&1 ” mean? 15 answers
 
find /home -name .bashrc > list 2>&1
i learn book above command redirect output of find file called list including both stdout , stderr. (particularly, things in stdout outputted in front of stderr.)
and know 2 stderr, 1 stdout.
but i'm having problem "parsing" , understanding > list 2>&1 part? , 2>&1?
> list redirects command's standard out file list.
2>&1 redirects standard error standard out. in case, standard out file list, list contain output , errors find command generates.
further read: https://www.gnu.org/software/bash/manual/html_node/redirections.html
Comments
Post a Comment