Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

He didn't even get the find command that he has such a distaste for correct:

> How can we recursively find all the files with \ name in a folder foo? The correct answer is: find foo -name '\\\\'

No, the correct answer:

  % find foo -name '\\'
  foo/\
> We need to write four backslashes here as UNIX shell performs backslash expanding, and find does it too.

The single quotes prevent the shell from performing escaping. Find does need escaping, and that's the only layer that does, so the correct answer has two backslashes.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: