dos常用命令

1. 打印树状结构的文件目录(windows)

  • 查询
tree /?

实践效果

  • 目录结构会打印到tree.txt文件中
tree /f > tree.txt

pwd 查看当前路径
ls 查看所有当前路径的子文件
cd 改变路径

2. 打印树状结构的文件目录(mac)

  • 模拟tree:
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
  • 添加到你的.bash_profile文件
echo "alias tree=\"find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'\"" >> ~/.bash_profile && source ~/.bash_profile

posted @ 2017-11-30 14:19  chiuyer  阅读(96)  评论(0)    收藏  举报