Friday, August 17, 2012

How to create empty file with a fixed size

In Linux, we use mktemp or mkfile.
In Solaris, we use touch.

In AIX, we try the following

# /usr/sbin/lmktemp filename filesize

e.g.


# /:> lmktemp Log 104857600
Log

# /:>chown myusr:mygrp Log

# /:>ls -ltr
total 204808
-rw-r--r--    1 myusr   mygrp    104857600 Aug 15 17:12 Log

# /:>file Log
Log: commands text


Thats all folks!

No comments: