Tiny Core Extensions > TCE Q&A Forum
tcz-uninstall.tce - does it have the -f option
bigpcman:
--- Quote from: curaga on May 25, 2009, 08:01:06 AM ---Without requiring findutils, one could just:
--- Quote ---find /tmp/tcloop/"$APP" -type d | sed "s@\/tmp\/tcloop\/${APP}@@" | xargs rmdir
--- End quote ---
I haven't tested this code, but rmdir doesn't remove a directory if there's even a single file.
--- End quote ---
Can this command be made to work recursively? That is if an empty folder is deleted and the deletion causes the parent folder to be empty and so on can all the empty folders in sequence be deleted?
jpeters:
--- Quote from: curaga on May 25, 2009, 11:53:17 AM ---/ has files in it, thus it doesn't get removed
--- End quote ---
weird....I typed the exact same command into another terminal, and it worked. The find was literally
producing "/" instead of /dir/dir
curaga:
--- Quote ---Can this command be made to work recursively?
--- End quote ---
Not easily, so rerunning it a couple times is an easy solution for recursion
edit:
--- Quote ---weird .... it worked.
--- End quote ---
:D
bigpcman:
--- Quote from: curaga on May 25, 2009, 12:28:35 PM ---
--- Quote ---Can this command be made to work recursively?
--- End quote ---
Not easily, so rerunning it a couple times is an easy solution for recursion
edit:
--- Quote ---weird .... it worked.
--- End quote ---
:D
--- End quote ---
You mean it works recursively as is? If so can you explain how?
curaga:
No, it doesn't work recursively, I just had to point out jpeters' well chosen words ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version