اليوم وأنا عم أكتب مقال، لقيت إن أمر tree عم يطلع الحروف الصينية بشكل ملخبط (乱码):
macbook:blog thiswind$ tree source
/source
/├── 404
.md├── CNAME
├── _posts
│ ├── Tree-?\221
?令中?\226\207乱?\201?\227??\230?\232\204解?\206?.md│ ├── hello-world.md
│ └── ?\207
??\224?软件.md├── about
│ └── index.md
├── categories
│ └── index.md
├── debug.log
├── favicon.ico
└── tags
└── index.md
4
directories, 10 files macbook:blog thiswind$
الحل إنك تضيف البارامتر -N على أمر tree، وهيك:
tree -N
macbook:blog thiswind$ tree -N source
/source
/├── 404
.md├── CNAME
├── _posts
│ ├── Tree-命令中文乱码问题的解决.md
│ ├── hello-world.md
│ └── 自由软件.md
├── about
│ └── index.md
├── categories
│ └── index.md
├── debug.log
├── favicon.ico
└── tags
└── index.md
4
directories, 10 files macbook:blog thiswind$