LoginSignup
14

More than 5 years have passed since last update.

シェル芸100% よくつかう

Last updated at Posted at 2017-05-02

個人的によくつかうワンライナーを集めてみました。(随時更新)

カレントディレクトリ以下の"pattern"を文中に含むファイルを表示する

grep -rnw . -e "pattern"

※最強によくつかう

カレントディレクトリ以下のファイルの文中のbeforeをafterに書き換える。

find -type f | xargs perl -wpi -e 's!before!after!g'

※要perl

カレントディレクトリ以下の.svnディレクトリを全て消し去る

find -type d|grep '\.svn'|xargs rm -rf

※古いバージョンのsvnは管理対象ディレクトリ全てに.svnディレクトリがありました。(懐古)

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
14