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
S. Ferré, и O. Ridoux. Proceedings of the 9th International Conference on Conceptual Structures, том 2120 из Lecture Notes in Artificial Intelligence, стр. 187-201. Springer, (2001)
D. Gifford, P. Jouvelot, M. Sheldon, и J. O'Toole. Proceedings of the 13th ACM Symposium on Operating Systems Principles, 25, стр. 16-25. Pacific Grove, California, United States, ACM Press, (1991)