view notes @ 0:c1b3644bfc04

initial import
author Eris Caffee <discordia@eldalin.com>
date Mon, 09 May 2011 20:15:10 -0500
parents
children
line source
1 What does this need to do?
4 Detect when you are attempting to delete anything other than something _under_ a subdirectory of /home and ask for confirmation before proceeding.
6 Examples safe to delete
8 /home/user/file
9 /home/user/dir
10 /home/user/dir/dir/file
12 Example that require confirmation
14 /home/dir
15 /home/file
16 /etc
17 /
21 Implementation:
23 Preferably it should be implemented in a way that will be transparent to scripts. We do not want to have to recode any scripts that call rm.
25 A shell function loaded only in interactive shells therefore comes to mind.