Linux bc 命令
Linux tail 命令
Linux xargs 命令
Linux 常用命令全拼
千年的回眸
#linux shell 删除指定目录下所有文件
#速度刚刚的快啊 几万个文件二秒完成
#不可思意 不过rm -rf 要万分小心 太危险了 我删除了整个WEB服务器内容哭
#delAllFileInArray.sh文件名
#内容
#!/bin/bash
array=("tcpip" "jquery" "punster" "w3cnote" "markdown" "thinkinphp" "html" "sql" "mysql" "linux" "operations" "csharp" "swift" "html-media" "java" "php" "js" "jsref" "css" "css3" "ado" "ajax" "joke" "git" "vue2" "android" "font-awesome" "cssref" "quality" "bootstrap" "memcached" "demos" "pictures" "svn" "webservices" "wsdl" "tags" "json" "bootstrap4" "rdf" "rss" "soap" "regexp" "foundation" "htmldom" "http" "react" "angularjs" "hosting" "angularjs2" "nodejs" "mongodb" "python3" "pythontutorial" "w3c" "python" "typescript" "googleapi" "highcharts" "svg" "poetry" "jqueryui" "jeasyui" "poet" "redis" "sqlite" "django" "docker" "ruby" "eclipse" "cprogramming" "cplusplus" "perl" "lua" "servlet" "dictionary" "jsp" "scala" "go" "design-pattern" "numpy" "appml" "maven" "kotlin" "ionic" "jquerymobile" "xml" "dtd" "dom" "xsl" "xpath" "xquery" "xlink" "schema" "xslfo" "web" "aspnet" "ancient" "famous_quotes" "flutter" "browsers" "charsets")
# 注意是用空格分开,不是逗号!!
# 不能执行时chmod +x delAllFileInArray.sh#给delAllFileInArray.sh可执行权限
function read_dir(){
for file in `ls $1` #注意此处这是两个反引号,表示运行系统命令
do
if [ -d $1"/"$file ] #注意此处之间一定要加上空格,否则会报错
then
read_dir $1"/"$file
else
ls -l $1"/"$file #在此处处理文件即可 rm -f
fi
done
sleep 1s #为了演示 不让运行太快
}
for i in ${array[@]};
read_dir $i
英文标题不为空时 视为本栏投稿
需要关键字 描述 英文标题
千年的回眸
#linux shell 删除指定目录下所有文件
#速度刚刚的快啊 几万个文件二秒完成
#不可思意 不过rm -rf 要万分小心 太危险了 我删除了整个WEB服务器内容哭
#delAllFileInArray.sh文件名
#内容
#!/bin/bash
array=("tcpip" "jquery" "punster" "w3cnote" "markdown" "thinkinphp" "html" "sql" "mysql" "linux" "operations" "csharp" "swift" "html-media" "java" "php" "js" "jsref" "css" "css3" "ado" "ajax" "joke" "git" "vue2" "android" "font-awesome" "cssref" "quality" "bootstrap" "memcached" "demos" "pictures" "svn" "webservices" "wsdl" "tags" "json" "bootstrap4" "rdf" "rss" "soap" "regexp" "foundation" "htmldom" "http" "react" "angularjs" "hosting" "angularjs2" "nodejs" "mongodb" "python3" "pythontutorial" "w3c" "python" "typescript" "googleapi" "highcharts" "svg" "poetry" "jqueryui" "jeasyui" "poet" "redis" "sqlite" "django" "docker" "ruby" "eclipse" "cprogramming" "cplusplus" "perl" "lua" "servlet" "dictionary" "jsp" "scala" "go" "design-pattern" "numpy" "appml" "maven" "kotlin" "ionic" "jquerymobile" "xml" "dtd" "dom" "xsl" "xpath" "xquery" "xlink" "schema" "xslfo" "web" "aspnet" "ancient" "famous_quotes" "flutter" "browsers" "charsets")
# 注意是用空格分开,不是逗号!!
# 不能执行时chmod +x delAllFileInArray.sh#给delAllFileInArray.sh可执行权限
function read_dir(){
for file in `ls $1` #注意此处这是两个反引号,表示运行系统命令
do
if [ -d $1"/"$file ] #注意此处之间一定要加上空格,否则会报错
then
read_dir $1"/"$file
else
ls -l $1"/"$file #在此处处理文件即可 rm -f
fi
done
sleep 1s #为了演示 不让运行太快
}
for i in ${array[@]};
do
read_dir $i
done