logoalt Hacker News

ElijahLynnyesterday at 10:39 PM3 repliesview on HN

I found the explanation useful, about "why" it is that way. I didn't realize the & before the 1 means to tell it is the filedescriptor 1 and not a file named 1.


Replies

hrmtst93837today at 6:38 AM

The distinction between file descriptors and regular files trips up many people at first. Recognizing that `&` signifies a file descriptor clears up the confusion about the syntax.

weavieyesterday at 10:42 PM

I get the ocassional file named `1` lying around.

LtWorfyesterday at 11:30 PM

It's an operator called ">&", the 1 is the parameter.

show 1 reply