A long time ago, well before sudo came to existence, I did, as root: "rm -rf . /foobar" where I wanted "./foobar". Oh well, homedir gone, ridiculed by colleagues etc.
- never work as root. never. - always use "." to prepend your path when expressing relative paths - prefer developing a small wrapper to often-used commands. " alias rm='rm -i' " in your .bashrc (or equiv.) is a simple solution. Writing a shell script called mybackup.sh or something is usually the way I go. After my mishap, I had a colleague who shared with me his personal trick: alias rm to his version of rm, which was in fact a "move" command to a specific trash directory. The trash being emptied via cron every so often. In the specific case of backing up to USB, you could use the /etc/udev/ rules files to recognize the brand of bridge that gets connected, and if this is the backup drive, then run a script: - mount to a specific location, with specific rights, - stat the filesystem, - launch the backup as a specific user, - auto-dismount at the end. This is a bit stringent, as plugging the drive will automatically command a long, uninterruptible process. Personally I prefer running a custom command at will. -- epoch1970 ------------------------------------------------------------------------ epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=66269 _______________________________________________ discuss mailing list discuss@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/discuss