Closed GoogleCodeExporter closed 9 years ago
PS A file over 4GB does work - for 4572839936 byte file
cat returns filesize is 0x11090000 and echos 'fred'
but 20GB file 21474836480 bytes gives 0x500000000 and does not echo fred
Original comment by Steve6375
on 26 Apr 2014 at 11:11
I think but is that it only looks at lower 4 bytes of 8 byte returned value.
Because my file is exactly 0x50,0000,0000 it sees the 0000,0000 as being 0
Original comment by Steve6375
on 26 Apr 2014 at 11:30
Note: On an NTFS partition
cat --length=0 /a_folder
displays 'filesize is 0x0' but it is not a file, it is a folder/directory!
On a FAT32 partition, it does not display 'filesize is 0x0' but gives an 'error
1: Filename must be an absolute pathname or a blocklist' message.
Original comment by Steve6375
on 26 Apr 2014 at 11:14
If this is difficult to fix, can the result returned just be maximum 3.999GB?
i.e.
3GB file >>> 3GB
5GB file >>>> 3.9990GB 0xFFFFFFFF
20GB file >>> 3.999GB 0xFFFFFFFF
That way we know the file is not 0 length at least.
Original comment by Steve6375
on 27 Apr 2014 at 6:43
Any fix for this please?
Original comment by Steve6375
on 8 May 2014 at 9:07
I wish to compare the file size of two large files.
One is 4.3GB and the other may be larger or smaller.
How can I check to see if the other file is larger or smaller
cat --length=0 /FILE43GB
echo %@retval%
does not return correct size.
Original comment by Steve6375
on 10 Jun 2014 at 7:58
The @retval is a 32-bit.
and all grub4dos builtin cmd return a 32-bit number.
current cant try below
cat --length=0 /FILE43GB
read 0x8290 || read 0x8294 || echos 'fred'
I think we can make a patch to this,
cat --length=0 /XXXX return 1 when file size over 4GB.
Original comment by chenall.cn
on 4 Aug 2014 at 8:32
github.com
https://github.com/chenall/grub4dos/issues/6
Original comment by chenall.cn
on 4 Aug 2014 at 8:40
What if file is 1 byte - I will think it is >4GB?
Largest number is 1.999GB (as signed number??) or 3.999GB
Why not return max size for 32-bit number?
Original comment by Steve6375
on 4 Aug 2014 at 8:47
Ok return -1 over 4GB.
Original comment by chenall.cn
on 4 Aug 2014 at 9:40
Original issue reported on code.google.com by
Steve6375
on 26 Apr 2014 at 10:37