[Shell] 让getfacl 的结果显示中文

getfacl 这条命令在读取中文名文件的权限列表时,会将中文字显示成 \xxx\xxx\xxx(x为0-9的数) 这样的形式。前两天在 irc://irc.debian.org/#debian-zh 上抱怨了一下,好心的Chaos`Eternal 给了我一个shell 函数,用来解决中文显示的问题,趁现在还记得住,先写下来:

function lgetfacl(){ getfacl "$@" | sed 's/\\/\\\\/g' | while read LINE; do echo -e $LINE; done }

嗯,是的,就这么简单,挺管用。

评论

此博客中的热门博文

激活华为光猫的小宇宙-openwrt

[Google Maps] Where are you from?

Debian: tor + privoxy