Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Clean Up Empty Directories

by morgon (Priest)
on Feb 17, 2018 at 02:24 UTC ( [id://1209370]=note: print w/replies, xml ) Need Help??


in reply to Clean Up Empty Directories

On what system does this actually work?

On linux even empty directories take up some space so "du -kh" reports 4.0K for them and therefore never would be deleted by your logic as far as I can see...

This is simply (not even talking about the hard-coded directory) broken code.

Replies are listed 'Best First'.
Re^2: Clean Up Empty Directories
by GotToBTru (Prior) on Feb 19, 2018 at 19:18 UTC

    It works on the AIX system where I run it. I get 0s from du -kh for empty directories. I was going to ask if it was unreasonable to assume that posted code works, but then I remembered about a million cases where that wasn't the case, so I can't fault you for asking.

    You can talk about the hardcoded directory, if you want. I'm pretty sure you can even change it or rewrite it without it.

    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://1209370]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-03-29 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found