网站建设方案报告,一个专门做视频配音的网站,网络平台怎么建,怎么把网站加入黑名单在Windwows下很喜欢tree命令#xff0c;在CenntOS下也有这条命令#xff0c;在网上找到了源代码和一段简单的脚本#xff0c; 完整的tree源代码可以在这里下载#xff1a; ftp://mama.indstate.edu/linux/tree/ 简易的tree脚本如下#xff1a; #!/bin/sh
################…在Windwows下很喜欢tree命令在CenntOS下也有这条命令在网上找到了源代码和一段简单的脚本 完整的tree源代码可以在这里下载 ftp://mama.indstate.edu/linux/tree/ 简易的tree脚本如下 #!/bin/sh
#######################################################
# UNIX TREE #
# Version: 2.3 #
# File: ~/apps/tree/tree.sh #
# #
# Displays Structure of Directory Hierarchy #
# ------------------------------------------------- #
# This tiny script uses ls, grep, and sed #
# in a single command to show the nesting of #
# sub-directories. The setup command for PATH #
# works with the Bash shell (the Mac OS X default). #
# #
# Setup: #
# $ cd ~/apps/tree #
# $ chmod ux tree.sh #
# $ ln -s ~/apps/tree/tree.sh ~/bin/tree #
# $ echo PATH~/bin:\${PATH} ~/.profile #
# #
# Usage: #
# $ tree [directory] #
# #
# Examples: #
# $ tree #
# $ tree /etc/opt #
# $ tree .. #
# #
# Public Domain Software -- Free to Use as You Like #
# http://www.centerkey.com/tree - By Dem Pilafian #
#######################################################echo
if [ $1 ! ] #if parameter exists, use as base folderthen cd $1fi
pwd
ls -R | grep :$ | \sed -e s/:$// -e s/[^-][^\/]*\//--/g -e s/^/ / -e s/-/|/
# 1st sed: remove colons
# 2nd sed: replace higher level folder names with dashes
# 3rd sed: indent graph three spaces
# 4th sed: replace first dash with a vertical bar
if [ ls -F -1 | grep / | wc -l 0 ] # check if no foldersthen echo - no sub-directoriesfi
echo
exit转载于:https://www.cnblogs.com/java20130726/archive/2013/01/29/3218684.html