Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

That kind of stuff sounds good, but it’s dangerous. You risk getting used to it, and then getting hosed when you’re on a normal system. Some people use a similar thing where they set "rm" as an alias to "rm -i", i.e. ask interactively before removal of each file.

I once heard a story about some SunOS consultant who was used to "rm" being an alias for "rm -i", and the first thing this consultant did, as root, was to "cd /etc" and then "rm *".



One of my first introductions to the fact that GNU getopt is much different from BSD/UNIX getopt was running `rm * -i` on Solaris. Instead of prompting me for which files to delete, it removed all of my files and then printed an error about failing to remove the non existent file "-i".


In principle this could be solved by having two aliases `rsync-dry-run` and `rsync-for-real`, and aliasing `rsync` to `echo "Use rsync-dry-run or rsync-for-real“`.


That's great, I'll do that now. Thanks!




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: