This shell program will creates a directory and that will move all of the files you deleted. This script is useful for restoraton of files after they have been removed. The intresting part is that UNIX system has no undelete capability
>Create a directory
mkdir /.recyclebin
>Write a shell script
vi /myrm
Ø mv $1 /.recyclebin/$1
>Edit bashrc file and add line at last as
vi /etc/bashrc
Ø alias rm=’/myrm’
Now onwards when you remove file with using rm the file will be moved to /.recyclebin directory.
No comments:
Write comments