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.

Create a temp file in Linux

Answer:

To create a temp file in Linux, you can use the mktemp command

E.g.

# mktemp foo.XXXXXXXXXXX

foo.aAIYdsa5027

mktemp will replace XXXXX... by random characters and create that temp file for you.

  1. Create an empty file in Linux
  2. Generate random number in Linux
  3. How to create a dummy file with a given size in Linux?
  4. How to create an empty file in Linux
  5. Auto create complete directory structure when copying files in Linux

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>