Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Clean Up Empty Directories

by choroba (Cardinal)
on Feb 16, 2018 at 23:35 UTC ( [id://1209349]=note: print w/replies, xml ) Need Help??


in reply to Clean Up Empty Directories

I usually just run
find -type d -empty -exec rmdir {} +
several times until there's no empty directory.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Clean Up Empty Directories
by Anonymous Monk on Feb 18, 2018 at 16:17 UTC

    GNU find has a -delete action. It implies -depth and as such, can do the clean-up in one go.

Re^2: Clean Up Empty Directories
by GotToBTru (Prior) on Feb 19, 2018 at 19:25 UTC

    I'm pretty sure the command that does the file cleanup is a find command somewhere. I think that there should have been a way to write it such that it cleaned out the directories too.

    But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209349]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-19 21:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found