The ls(1) man page describes the -B option: -B Force printing of non-printable characters (as defined by ctype(3) and current locale settings) in file names as \xxx, where xxx is the numeric value of the character in octal. When you do a recursive listing (ls -R) ls will print out the directory name followed by a colon. Eg: /usr/bin: total 28322 etc. If there are non-printable characters in the directory name, they are printed rather than escaped. How-To-Repeat: % mkdir /tmp/foo % cd /tmp/foo % mkdir ' ibebad:\ ha ha' % ls -BoTnilR
I would like to note that Linux's ls has a -b flag that is analogous to FreeBSD ls's -B. The Linux version is not broken. This leads to a query: why are the Linux & FreeBSD ls programs so different? For reference, I was looking at Debian with a 2.4.19 kernel.
State Changed From-To: open->patched Now fixed in -CURRENT, change will be MFC'd in one month.
Responsible Changed From-To: freebsd-bugs->tjr Now fixed in -CURRENT, change will be MFC'd in one month.
State Changed From-To: patched->closed Change has been MFC'd.