Linux下一次删除所有空目录的方法

上一篇 / 下一篇  2007-03-02 10:22:10 / 个人分类:LAMP


2J Uu QV&w9x^0

, ,

]&\TQD?{0

i9LT)Z;vT*TV0方法一:用 Perl 实现
Y:l/@m1~0木铎校园 BBS 社区-|:}E-^;Yn]
程序
n?O,i9o0#!/usr/bin/perl
e#c$F#p_K0use File::Find;木铎校园 BBS 社区^A:q2e,Nd d
finddepth(sub{rmdir},'.')

!O$H5K7]1i Xp mQ0
w S(g BV;h0命令
/T^8CVqN0perl -MFile::Find -e"finddepth(sub{rmdir},'.')"木铎校园 BBS 社区'q3d@EHwyp

t&ows"C8o0木铎校园 BBS 社区+nE:NSIgO
方法二:用 Shell scrīpt 实现木铎校园 BBS 社区4I\c IFd z
木铎校园 BBS 社区?-]d,ifqc"R V
find -depth -type d -empty -exec rmdir {} \;木铎校园 BBS 社区\P B ?*wA
木铎校园 BBS 社区dde8vO(lE-C
以上方法来自:http://duramecho.com/ComputerPrograms/DeleteEmptyDirectories/index.html

TAG: LAMP

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

关于作者