记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。


创建好普通用户时,执行rm,cp,rm 命令时,并没有提示删除,覆盖。

不太安全,执行时如果出错,不容易看出来。

修改普通用户环境变量后,就可以正常使用了。

具体如下:


[cwt@web ~]$  cat .bashrc

# .bashrc

# Source global definitions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions




[cwt@web ~]$  cat .bash_profile

# .bash_profile

# Get the aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH



转载请标明出处【Centos6、RHEL6普通用户cp,rm,mv命令无交互提示解决方法】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论