Timeline for Can the "find" command work more efficiently to delete many files?
Current License: CC BY-SA 3.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 5, 2016 at 8:45 | vote | accept | donatello | ||
| Apr 5, 2016 at 8:38 | answer | added | shoelace | timeline score: 0 | |
| Mar 10, 2015 at 13:10 | history | edited | Volker Siegel | CC BY-SA 3.0 |
Make title less confusing regarding the word "find"
|
| S Aug 28, 2014 at 20:58 | history | suggested | countermode |
removed misleading linux tag, Q is not about linux
|
|
| Aug 28, 2014 at 20:50 | review | Suggested edits | |||
| S Aug 28, 2014 at 20:58 | |||||
| Aug 28, 2014 at 20:31 | history | edited | donatello | CC BY-SA 3.0 |
Added requested info
|
| Aug 28, 2014 at 6:27 | answer | added | SysadminB | timeline score: 0 | |
| Aug 28, 2014 at 6:19 | comment | added | Volker Siegel | @StevenWalton That is what I thought too... before it got "nasty", see the answer... | |
| Aug 28, 2014 at 4:50 | answer | added | Volker Siegel | timeline score: 14 | |
| Aug 28, 2014 at 2:30 | comment | added | Ramesh |
I am not sure if ionice will give you any advantage. Also, there seems to be a way with a php code as discussed in this link. stevekamerman.com/2008/03/…
|
|
| Aug 28, 2014 at 0:25 | comment | added | MaybeALlama |
So check that the files you want are found. You say that you aren't sure that it is deleting them. So just remove the -delete flag from the end and see if it outputs. You should be doing this to check anyway. If it doesn't find your files then they don't exist (possibly deleted already) or your search parameters are wrong. I'm just asking you to verify, since you seem unsure if it is deleting. Because your given command should work.
|
|
| Aug 28, 2014 at 0:16 | comment | added | donatello | Yes, I am sure the conditions are what I want. Only files deeper than a depth of 2 should be deleted. My questions is if find can do the deletion immediately after testing a file, instead of collecting files that satisfy the conditions and then deleting in the end. | |
| Aug 28, 2014 at 0:03 | comment | added | MaybeALlama |
So you can check by looking directly at files. Are you sure -mindepth 2 is what you want? It won't delete anything in your current folder. Try the find command without the delete flag. If it outputs the files you want, then you know you should be deleting those files (always a good safety check to do too. I do this before every batch rm).
|
|
| Aug 27, 2014 at 23:46 | history | asked | donatello | CC BY-SA 3.0 |