tree无法显示中文

tree是一个可以递归遍历并显示目录内容的程序。 如果您使用的是ubuntu,无法显示中文(如下):

\346\267\261\345\205\245Python

只需手动从主页,http://mama.indstate.edu/users/ice/tree/ 下载安装>=1.5.2.2版本即可修复。

wget ftp://mama.indstate.edu/linux/tree/tree-w.x.y.z.tgz
tar zxf tree-w.x.y.z.tgz
cd tree-w.x.y.z
make
sudo make install

深入Python

Read More:

9 Comments

  1. 1 Lucseeker Commented @ 2009-08-22 10:15Reply to this comment

    tree -N dirname

  2. 2 hzxu Commented @ 2009-08-22 10:19Reply to this comment

    为什么是UBUNTU的就无法显示中文?

    安装新版本来解决问题,这是所有DISTRO都适用的.

  3. 3 shuge.lee Commented @ 2009-08-22 10:51Reply to this comment

    不是ubuntu的就无法显示

    准确点来说,小于1.5.2.2版本的都有问题

    有些发行版的软件比较新,就没有问题,比如牛X的Gentoo

  4. 4 jack Commented @ 2009-08-22 13:17Reply to this comment

    fedora 没问题

  5. 5 杞人 Commented @ 2009-08-23 6:44Reply to this comment

    Version 1.5.1.1 在 Ubuntu 8.04 可以显示中文

  6. 6 chenfengyuan Commented @ 2009-08-23 12:07Reply to this comment

    tree v1.5.0,没有问题,slackware

  7. 7 shuge.lee Commented @ 2009-08-23 12:38Reply to this comment

    不排除locale设置问题

  8. 8 walker Commented @ 2009-08-24 14:40Reply to this comment

    Ubuntu 9.04 安装和使用语言为中文(utf8),默认安装的tee不能正确显示中文

  9. 9 weff Commented @ 2009-09-01 9:15Reply to this comment

    1楼正解