hi ya mv will NOT move stuff across filesystems ( partitions ) so the "myrm" shown below will NOT work "properly"... - it'd make things worst ... half is still stuck in /usr and the files that were moved is ins $backup_dir
- - dont use rm .... - force rm to ask if its okay ( -i option ) - - dont login as root <<<--- your lesson learned ???? - make backups... <<<--- another major lesson - c ya alvin On Sun, 8 Apr 2001, Roberto Diaz wrote: > > I don't have the luxury of a CD burner. I backup to the hard drive of > > another machine. I don't have room to do a full backup, but a backup > > of the important bits should be enough to recover --- just that it > > might take a little longer. An undelete feature would mean a > > reduction in the number of circumstances where this "longer > > restoration effort" was required. > > You havent an undelete in unix but you can easily implement something like > this: > > For example you can make your own rm: > > (pseudocode that shall be improved but you get the idea) > myrm: > > #!/bin/bash > backup_dir=/usr/local/share/secure/backup > > for i in $* > do > # fix: comprobe first if the file exist in the backup and rename > # as needed > mv $i $backup_dir # dont rm just move. > done > exit 0 > > then you could put a crontab to remove the contentents at backup_dir > periodically, or just do it by hand.. > > if you remove something by accident you dont have to care about this since > you only has moved it.. >