4
6

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.

【Salesforce初心者】環境差分を特定するコマンドー>複数ファイルのdiffを取る

Last updated at Posted at 2017-06-26

途中に入ったPJで、デプロイをするときに、予定外の環境差分があることが発覚されました。
余計なゴミとかデプロイしたくないので、手取り早く差分を特定する方法を調べてみました。

下記のリンクを参考にしました:
http://qiita.com/7of9/items/e97a8581bdf40eec5030

clsファイルや、xmlファイルなどの差分を特定するときに有効。
linuxやUnixの環境が必要ですが、
シェルとか書く必要がなくそのまま使えるので、とても便利です。

diff -r folderA folderB
//diffのあるファイル名を表示
diff -r folderA folderB | grep diff
//上記のファイル数をカウント
diff -r folderA folderB | grep diff | wc -l
//片方のフォルダにしか存在しないファイル名を表示
diff -r folderA folderB | grep Only
//上記のファイル数をカウント
diff -r folderA folderB | grep Only | wc -l
4
6
0

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
4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?