Add text at the beginning of a file

with echo

$ echo '<stringtoplace>' | cat - <destinationfile> > temp && mv temp <destinationfile>

with sed

$ sed -i '1s/^/<stringtoplace>\n/' <destinationfile>
$ sed -i '1i<stringtoplace>' <destinationfile>

create file with specific size

$ dd if=/dev/zero of=/destination/path/file bs=1  seek=<size|e.g. 12G>
$ fllocate -l <size|e.g. 12G> /destination/path/file