News for hackers. Stuff that matters.
Re:Some Useful Bash Aliases – Chuck Carroll by metal on Monday December 25, 2023 @02:31PM (#38765386)
Do this in important directories for added safety: $ touch -- - i This creates a file called "-i" which will add the interactive flag, prompting you before deleting every file that rm was going to delete.
Re:Some Useful Bash Aliases – Chuck Carroll by Galanwe on Monday December 25, 2023 @04:15PM (#38766189)
That seems flaky at best. Basically you rely on "*" expansion to inject the -i.

While that may work for `rm -rf *`, it won't for `rm -rf foo/*`, `rm -rf foo`, etc

Re:Some Useful Bash Aliases – Chuck Carroll by metal on Monday December 25, 2023 @05:50PM (#38767041)
That's the point. You're not relying on it, it's a safety to save yourself from an unintended glob expansion.
Re:Some Useful Bash Aliases – Chuck Carroll by Groxx on Monday December 25, 2023 @05:40PM (#38766947)
Or for far better reliability, just use safety and add that to the config.