Here is a small tip.
People used to ask me, how can we increase a file size in linux ? Mostly it is in conjuction with ‘virtual image file’ .. It is possible to increase/decrease the size of the file using 2 ways (those are atleast known to me)
One method is using ‘dd‘ command. I am sure it is pretty much common to you . If not, let me know, so that I can expand it.
Other being ‘truncate’ command. I will give small demo on how to use ‘truncate’ command.
truncate – shrink or extend the size of a file to the specified size
If a FILE is larger than the specified size, the extra data is lost. If a FILE is shorter, it is extended and the extended part (hole)
reads as zero bytes.
For more information please refer #man truncate
Here is an example from my system:
which truncate
coreutils-8.12-7.fc16.x86_64
[root@humbles-lap ~]#
Note the size of the file called ‘cscope.out’ , this can be a virtual image file as well:
Use ‘truncate’ to extend ‘100M’
Note the new size of the file