Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Touch is by default idempotent.

maybe, depending on your definition of idempotent. It does update the modification time of the file, which does result in a different state if it is run multiple times. Although in practice, that probably doesn't matter most of the time.



I've primarily used touch as a timestamp updater, not a file creator. But to be charitable, it is under the headline "Creating an empty file".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: