Re:The Unexpected Importance of the Trailing Slash
by l33tman on Saturday April 09, 2022 @04:18AM
(#30966160)
I'm still scared every time I use rsync because of that and have to thoroughly check the man-page examples :)
[ Parent
| on HN ]
Re:The Unexpected Importance of the Trailing Slash
by thwarted on Saturday April 09, 2022 @06:21AM
(#30966739)
No need to fear! Use --dry-run to confirm your command line before making the changes. It's documented in that very man page!
Re:The Unexpected Importance of the Trailing Slash
by 0des on Saturday April 09, 2022 @08:17AM
(#30967394)
I have a list of aliases I pass to my minions, one is to alias rsync with this, and the real rsync is aliased as rsyncplz
Re:The Unexpected Importance of the Trailing Slash
by teddyh on Saturday April 09, 2022 @08:49AM
(#30967604)
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 *".
Re:The Unexpected Importance of the Trailing Slash
by justinsaccount on Saturday April 09, 2022 @01:59PM
(#30970344)
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".