73
60

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.

ディレクトリdiffでファイル名だけ表示

Posted at

-qオプションを使う

       -q  --brief
              Output only whether files differ.

例)
ディレクトリ
4.1.2/libexec/conf と 4.2/libexec/conf
で差分があるファイルを調査したい。

-> % diff -r 4.1.2/libexec/conf 4.2/libexec/conf
48a49
> # - If you need to set the schema, please refer to http://jira.codehaus.org/browse/SONAR-5000
53,59d53
< # Uncomment the following property if the Oracle account has permissions to access multiple schemas,
< # for example sonar schemas with different versions. In that case, use the same property during project analysis
< # (-Dsonar.jdbc.schema=<schema>)
< # The schema is case-sensitive.
< #sonar.jdbc.schema=sonar
<
<
...

だと大量に差分が出るが-qオプション追加でファイル名のみ表示になる

-> % diff -qr 4.1.2/libexec/conf 4.2/libexec/conf
Files 4.1.2/libexec/conf/sonar.properties and 4.2/libexec/conf/sonar.properties differ

参考

linux - diff to output only the file names - Stack Overflow

73
60
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
73
60

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?