faking a file..
how can i set a fake filesize in a file? with touch i can modify only the dates... or alternatively, if it isn't possible to fake filesize, how can i fill an empty file with X zeros to reach the size i need?
thanks a lot |
I don't know, Azureus seems to be able to do that :)
Hmm, must be something to do with the filesystem. Well, you can write a loop prog to cat 0 >> fake.file. But that is not really fake since you are actually using up that amount of space on disk. Just my 2 cents. |
Hi,
You could use dd (man dd for details). Example: dd if=/dev/zero of=outfile bs=1024 count=10 This creates tge following ('empty') file: 10240 Mar 20 14:10 outfile Hope this helps. |
i don't know if this qualifies as faking it but you can adjust the size of a file with the POSIX syscall
int ftruncate(int fd,off_t length); |
All times are GMT -5. The time now is 04:13 PM. |