0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

touchコマンドに関する誤解がひどい

touchコマンドはファイルの更新時間を更新するコマンドで、ファイルを作るコマンドではない。
なんでこれがいるのかは、開発者なら知っているはず。

makeコマンドとの関係

今は直にMakefileを書く人は少なくなったのだろうと思うけど、Makeはgcc等でコンパイル時にファイルの更新時間を比較して更新されたファイルに対してコンパイルを行う。
なのでシステム全体の再コンパイルをしたいとき、touchを使ってファイルの更新時間を更新する。
これが本来の使い方。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?