Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to create an empty file in Linux

Answer:

A simple touch command will create an empty file for you.

# touch test.txt

  1. Create an empty file in Linux
  2. How to create a dummy file with a given size in Linux?
  3. Create a temp file in Linux
  4. Remove empty lines in a file
  5. Remove comments (#) and empty lines in a file

One Response to “How to create an empty file in Linux”

  1. [...] using the touch command, any easy tricks is to use the > redirection, [...]

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>