truncate -s 10G foo
fallocate -l 5G bar
It needs to be stated that truncate on a file system supporting sparse files will create a sparse file and fallocate will not
P. Gourshettiwar, and P. Shirbhate. International Journal on Recent and Innovation Trends in Computing and Communication, 3 (4):
2132--2136(April 2015)
G. Di Nunzio, J. Leveling, and T. Mandl. Advances in Information Retrieval - 33rd European Conference
on IR Research, ECIR 2011, Dublin, Ireland, April 18-21,
2011. Proceedings, volume 6611 of Lecture Notes in Computer Science (LNCS), page 675--678. Springer, (2011)
W. Yu, S. Liang, and D. Panda. Proceedings of the 19th annual international conference on Supercomputing, page 323--331. New York, NY, USA, ACM, (2005)
D. Hildebrand, and P. Honeyman. Mass Storage Systems and Technologies, 2005. Proceedings. 22nd IEEE / 13th NASA Goddard Conference on, page 18 - 27. (April 2005)
W. Tantisiriroj, S. Son, S. Patil, S. Lang, G. Gibson, and R. Ross. Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis, page 67:1--67:12. New York, NY, USA, ACM, (2011)
T. Thanh, S. Mohan, E. Choi, S. Kim, and P. Kim. Networked Computing and Advanced Information Management, 2008. NCM '08. Fourth International Conference on, 1, page 144 -149. (September 2008)