您的位置:首页 > 运维架构 > Shell

Shell使用笔记-交互提示信息

2014-01-03 19:36 295 查看
== 使 Linux 下 rm cp不提示,一般用于写执行脚本

不走alias

\cp a b
\rm a

参照:
    http://g.51cto.com/xlinux/91511

    http://www.tt001.org/thread-417-1-1.html

== 不过最近也吃了亏,当手动操作的时候误删和误覆盖,使用 alias 进行解决

在 ~/.bashrc 里

加入

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

在 ~.bash_aliases 里 加入
alias realia='source ~/.bash_aliases'
alias cp='cp -i'
alias rm='rm -i'
alias mv='mv -i'

== scp无交互信息

点击

http://g.51cto.com/xlinux/91511

http://www.tt001.org/thread-417-1-1.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  shell linux
相关文章推荐