2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

「tail -f」じゃなくて「less +F」を使うように矯正したいときの.bashrc

Last updated at Posted at 2015-04-06

「tail -f」を使うのは情弱、情強は「less +F」を使うという話題がありましたが、
手癖でつい「tail -f」と打ってしまうのを矯正したいときに
以下を .zshrc とか .bashrc の下のほうにでも足してください。
※「-f」をつけない場合は普通のtailとして動きます。

tail () {
  if [ "$1" = "-f" ];then
    echo 'tail -f より less +F の方が機能が多くていいですよ'
    echo 'Use `less +F`'
  else
    /usr/bin/tail $*
  fi
}
2
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?