We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[shell] 在没有tree命令的系统里,用find实现tree命令
The text was updated successfully, but these errors were encountered:
下面是tree命令显示的结果: gao@gao-virtual-machine:~/test$ tree . |-- test1 | |-- test11 | | |-- test111 | | |-- test112 | | -- test113 | |-- test12 | -- test13 |-- test2 | |-- test21 | |-- test22 | -- test23 -- test3 |-- test31 |-- test32 `-- test33
-- test113 | |-- test12 |
-- test23
下面是find . -print|sed -e 's;[^/]/;|--;g;s;--|; |;g' 命令出来的结果: gao@gao-virtual-machine:~/test$ find . -print|sed -e 's;[^/]/;|--;g;s;--|; |;g' . |--test3 | |--test31 | |--test33 | |--test32 |--test1 | |--test11 | | |--test111 | | |--test113 | | |--test112 | |--test12 | |--test13 |--test2 | |--test23 | |--test21 | |--test22 使用find即可实现tree的功能了,特别是在没有tree命令的系统里。。 ———————————————— 版权声明:本文为CSDN博主「duanyu010」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/duanyu010/article/details/84477202
Sorry, something went wrong.
find . -print|sed -e 's;[^/]*/;|--;g;s;--|; |;g'
No branches or pull requests
[shell] 在没有tree命令的系统里,用find实现tree命令
The text was updated successfully, but these errors were encountered: