dd if=/dev/zero of=/foo/bar bs=1024 count=1
This would change the size of a file to 1 KB. inode number of the file would be preserved.So if you want to change the size to 2 MB
dd if=/dev/zero of=/foo/bar bs=1024 count=2048
Note that 2 MB is 2048 KB, and not 2000 KB.
No comments:
Post a Comment