- Published on
Today I Learnt: Create an empty file with touch
- Authors

- Name
- Mehdi Akiki
Create an empty file or update the mtime:
touch file.txt
Tip: use touch -c to avoid creating the file if it doesn't exist.
title: "Create an empty file (touch)" date: "2025-09-16" tags: ["bash","til"] draft: false summary: "Use touch to create files or update timestamps; redirection also creates files."
Create an empty file:
touch file.txt
> newfile.txt # create via redirection
Placeholder: more notes and alternatives.
I build and scale reliable production systems. Open to full-time and freelance work with U.S.-based teams that value ownership and execution.
Got something in mind?
Book a Discovery Call