Sometimes you might need to test certain functionality of a file system, e.g. if quotas are reported correctly. For this purpose you might want to upload a file on the server in specified size. You can easily create such a file using the command below:
dd if=/dev/zero of=filename bs=1024 count=1048576
Further reading – http://en.wikipedia.org/wiki//dev/zero