linux - If the size of the file exceeds the maximum size of the file system, what happens? -
for example, in fat32 partition, maximum file size 4gb. able create 5gb file vim , saved file , opened again, console output broken staircase. have 3 questions.
if size of file exceeds maximum size of file system, happens?
in case, why break?
in unix system call, stat() can succeed 2gb(2^31 - 1). have file system? there relationship between limits of data in stat() , limits of each feature in file system?
if size of file exceeds maximum size of file system, happens?
by definition, can never happens. happens system call (probably write(2) ...) failing, , code doing should take care of case.
notice fat32 filesystems restrict maximal size of files 2gigabytes. use better file system on usb key if want more (or split(1) large files in smaller chunks before copying them fat32-formatted usb key).
if using <stdio.h>
notice fflush(3), fprintf(3), fclose(3) (and other standard functions) can fail (e.g. because failing write(2)).
the console output broken staircase
probably because pseudoterminal in broken state. see stty(1), reset(1), termios(3) , read tty demystified.
in unix system call, stat() can succeed 2gb(2^31 - 1)
you misunderstanding stat(2). read again documentation
read advanced linux programming syscalls(2).
i able create 5gb file
vim
to understand behavior of vim read first documentation study source code (it free software, , can , perhaps should study code).
you use strace(1) understand system calls done command or process.
Comments
Post a Comment