2013年9月15日日曜日

Backup by cp command at Centos6.4

[root@hoge ~]# \cp -apruv /home/name /hd1tb/backupCentos/home/

In case of CentOS6.4.
"cp"="cp -i"
"cp" of CentOS is running in alias.

You can know if you try command "alias" on your computer.
[root@hoge ~]# alias
alias cp='cp -i'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

Or try this command
# which cp
alias cp='cp -i'
        /bin/cp

Option "cp -f" doesn't work for this alias..
When you want to use option f, simply escape "cp" or call with full path:
$ \cp -f
("\" is to escape alias.)
or
$ /bin/cp -f

0 件のコメント:

コメントを投稿