让rm命令提示确认后再删除
首先在~/.bashrc文件中添加一行:
# User specific aliases and functions
alias rm='rm -i'
注意,此处 rm 和 = 之间不能有空格,否则会有找不到rm命令的提示,
然后在终端执行这条命令,使得刚才的修改即刻生效:
source ~/.bash_profile
转自: http://blog.csdn.net/computerms/article/details/11766127
首先在~/.bashrc文件中添加一行:
# User specific aliases and functions
alias rm='rm -i'
注意,此处 rm 和 = 之间不能有空格,否则会有找不到rm命令的提示,
然后在终端执行这条命令,使得刚才的修改即刻生效:
source ~/.bash_profile
转自: http://blog.csdn.net/computerms/article/details/11766127