原文:
整理步骤如下:
$ tree-bash: tree: command not found$ sudo mkdir -p /usr/local/binPassword:$ sudo nano /usr/local/bin/tree------------复制下面到nano编辑器中-------------#!/bin/bashSEDMAGIC='s;[^/]*/;|____;g;s;____|; |;g'if [ "$#" -gt 0 ] ; then dirlist="$@"else dirlist="."fifor x in $dirlist; do find "$x" -print | sed -e "$SEDMAGIC"done------------复制上面到nano编辑器中-------------$ sudo chmod 755 /usr/local/bin/tree$ nano ~/.bash_profile------------复制下面到nano编辑器中-------------export PATH="/usr/local/bin:$PATH"------------复制上面到nano编辑器中-------------$ tree ~/Desktop/| | | |____| | | | |____.DS_Store| | | | |____.localized| | | | |____readme.txt$