rsyncで.svnを除外


rsyncでファイルを転送するときに、ほとんどの場合に(あくまでも私の場合!)、.svnは邪魔だということに今更気がついた。

というわけで、.bash_profileに以下の行を追加した。

alias rsync="rsync -avz --exclude=\".svn\""

これで、転送した後にfindとか使って.svnを削除したりしなくてすむ。

ちなみに、私の.bash_profileは以下のような感じ。

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

alias svndel="svn st | grep '^!' | sed -e 's/\![ ]*/svn del /g' | sh"
alias svnadd="svn st | grep '^?' | sed -e 's/\?[ ]*/svn add /g' | sh"
alias rsync="rsync -avz --exclude=\".svn\""
alias vi="vim"

export PATH
export LANG=ja_JP.UTF-8
PS1="[\u@\h \W]\$ "

関連する記事

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>