KB Article #152242
Preventing accidental file deletion
Problem
Resolution
When using root account on File Transfer Direct 2 it is possible to accidentally delete or overwrite file which might cause problems with the product. This is because commands cp, mv and rm are not interactive.
Resolution
In order to make cp, mv and rm commands interactive and prevent accidental file deletion or overwrite the following steps should be followed:
1. Create file named .bashrc (please note the dot in the beginning of the file name)
2. Edit this file .bashrc (with vi for example) and put in it these three lines:
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
3. Save and close file .bashrc
4. Logout and log back in
5. Try to create file and then remove it:
ftd:~ # touch junk
ftd:~ # rm junk
rm: remove regular empty file `junk'? y