Creating dummy (empty) files
By bruno combal on Thursday, December 11 2008, 18:29 - Permalink
For testing shell tips (linux and cygwin) it is often handy to
- work a test directory
- make some (tons of!) files
Ok, I suppose you can create directories (mkdir dirname
). Now, you can use touch
to create (empty) files:
touch a b c d
will create files a, b, c and d.
To create 200 file starting their names with file_
, followed with a number and ending with .img
, do
mkdir source
cd source
for ((num=0;num<200;num+=1)); do touch file_${num}.img ; done
Now you can tests the shell tips (example).