(env) ➜ zhuaxia git:(master) ✗ tree /tmp/test
└── 谢211220_3_8
├── album_description.txt
├── cover.jpg
├── 谢211220;210\230浩231_3_8.mp3
└── 谢211220_3_8.mp3

(env) ➜ zhuaxia git:(master) ✗ ls /tmp/test

Using tree command, some Chinese character is displayed as Unicode, but ls is OK.

  • I did not found the solution, but I found the error happens only when I sshed to Ubuntu from Mac OS X. – hailinzeng Nov 19 '16 at 14:13

I have problems same as you, but I did Google and found the answer! Just add the option

tree -N /name_of_directory

man tree reads:

-N     Print non-printable characters as is instead of as escaped octal numbers.

Tell me if this still does not work!

Also, you seem to use zsh?? I am not familiar with that. I use bash, though.

| improve this answer | |
  • 1
    Worked perfectly with homebrew installed tree (on MacOS X). Thanks! – Patrick May 16 '19 at 3:35

In my case the dashes that results in indentation in tree rendering was replaced with some strange character 'a' with a hat. Either tree -A or LC_ALL= C tree would resolve the issue then.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .