What does touch do?
touch creates an empty file if it does not exist, or updates the last-modified time of an existing file.
touch file…
Most useful options
| Option | What it does |
|---|---|
| -t | set a specific time stamp |
| -r ref | copy the time stamp of another file |
touch examples
In security work
Time stamps can be changed with touch, so investigators never trust them alone.
Questions about touch
Does touch overwrite a file?
No. If the file exists, only its time stamp changes; the content stays.