Hacker News new | past | comments | ask | show | jobs | submit login

You can fix that by adding -B (or -b) to the ls command.



Neither -b nor -B option is defined in the POSIX ls utility. The -b option is a GNU extension to print C-style escapes for nongraphic characters, and it is useful for this case. The -B option is also GNU extension not to list implied entries ending with ~, and I don't understand how it is relevant to this case.


On OS X and BSD (at least, and possibly others) the -B option forces octal-style \xxx output for non-printable characters, while -b uses C-style escapes where possible.

You are correct regarding the GNU option -B, which would not be relevant here, and regarding the fact that neither of these options are in POSIX. Thanks for pointing out those limitations.




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

Search: