Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a 0 byte file in ksh.

Tags:

unix

ksh

This is probably obvious, but Google seems to have let me down. I need to create a zero byte file with arbitrary names on Unix (AIX, ksh). What is a good command that will do this. Something I can script obviously.

Just to be clear Im not doing anything stupid. This is a script to generate certain testing scenarios. (Checking proper behavior when handling 0-byte files.)

like image 678
gbtimmon Avatar asked Apr 10 '13 17:04

gbtimmon


1 Answers

I figured it out.

touch $filename will do it.

like image 70
gbtimmon Avatar answered Sep 27 '22 21:09

gbtimmon