Timeline for Safe Directory Delete
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 13, 2016 at 4:10 | vote | accept | cape1232 | ||
| Mar 13, 2013 at 22:47 | comment | added | cinelli |
Adding to that. If the user doesn't know what's contained in foo/ then when rm -Ir foo is passed and it asks "You sure?" and the user says Yes without double checking and not knowing what's in the directory. Then, that's something nobody can answer other than. "Pay attention to what you're doing to you're system. Or go back to using the Recycle Bin in Windows."
|
|
| Mar 13, 2013 at 22:41 | comment | added | cinelli |
Seeing that rm foo would only remove one file. rm foo would only ask once. If you're talking about when removing the directory foo/ then the command rm -Ir foo would ask once as well (if it contained more than 3 files). If you were to remove a directory recursively that had 1000 files in it (for arguments sake). Then you'd be there for quite a bit of time saying Yes to confirm all the files with -i where since the user should know what files their deleting -I will ask once for any removal operation with three or more files involved.
|
|
| Mar 13, 2013 at 20:20 | comment | added | vonbrand | In my experience, this kind of aliases just makes the "rm foo<ENTER>y<ENTER>" automatic... i.e., no protection at the cost of 2 extra keystrokes. And it isn't available everywhere. Better don't do that, except for the greenest training-wheel-needy users. | |
| Mar 13, 2013 at 18:54 | history | answered | cinelli | CC BY-SA 3.0 |