Maximum File Size


 
Thread Tools Search this Thread
Top Forums Programming Maximum File Size
# 1  
Old 05-18-2006
Maximum File Size

Hi,

When i checked for the maximum file size on solaris 5.9
the max file size obtained was only 2147483647

and all the further writes to the file which had reached that max size is not added to that file.

even i had registered the signal SIGXFSZ, but the signal was not delivered to the program upon reaching the size

and to my astonishment,
once the file had reached the size 2147483647,
i tried with this simple redirection command
echo "abc" >> filename_max (it worked)
then found that file size was increased to 2147483651

then made a try to close the file pointer and reopen it if reached the maximum size, but ended in vain.

After reaching the maximum file size how is it able to further add contents to the file through the redirection operator and not through direct fprintf operation as such ?

could somebody please throw light upon this?
I really could not proceed.

Thanks,
Mad.
# 2  
Old 05-18-2006
Are there large file non-standard C functions on your box - like fopen64?
I would expect that to be true, and you need to use them to be able to write to large files, ie 64 bit file pointers required.

All of the system level calls obviously support this or you could not get a positive file size larger then what the 32 bit ssize_t datatype supports.
# 3  
Old 05-19-2006
that was a thunder Jim. Smilie Smilie Smilie

Is that the case that I had mentioned generating file of more than 2GB... legal to generate a SIGXFSZ signal to be delivered to the program.

I cannot pinpoint at the handlers that they werent correct. I have the other essential program guard signals working perfectly.

I doubt whether SIGXFSZ signal is generated from the above scenario Smilie
# 4  
Old 05-19-2006
Because the system supports large files you get no signal.
# 5  
Old 05-19-2006
i find it difficult to understand...

say for a system where the file size is unlimited
is the meaning of the signal SIGXFSZ is null?

if so,
then what is the meaning in having those signals under VALID signals that can be delievered to the program by the kernel !!! Smilie
# 6  
Old 05-19-2006
I'm not communicating.

Example:
If you have called setrlimit and set the max file size down to a number, say 100000, then the kernel will send SIGXFSZ to your process. When your file size hits the limit. You then call setrlimit and bump up the value.

If you do not call setrlimit, then the kernel will send SIGXFSZ when your process hits the system-wide value (or the per-process-defined value) for max file size.

The fact that your system seems to support 64-bit file size means:
Your default system max file size is probably more than 2147483647.
It is not clear to me how you arrived at 2147483647.
Did you set that value with setrlimit?
If file size shows "unlimited" it means that it uses the system-wide setting.
"unlimited" does not mean unlimited or infinite. It just means that the process limit is the same as the system.

Try playing with setrlimit on very small files and see what happens. Then you can create a model that will work on really big files.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Maximum size of attachment in mail

Hi Friends, My requirment is to Query the oracle database , generate the file change the extension to .csv and send to clients automatically everyday. However i am able to perform the task. But sometimes when the file size is getting increased more than 1 MB then the mail is... (5 Replies)
Discussion started by: Showdown
5 Replies

2. Programming

Maximum buffer size for read()

Hi friends, Hope everybody is fine. First have a look at my code, then we will talk about it. $ cat copy.c #include <stdio.h> #define PERMS 0644 /* RW for owner, R for group, others */ #define BUFSIZE 1 char *progname; int main(int argc,char * argv) { int f1, f2, n; ... (4 Replies)
Discussion started by: gabam
4 Replies

3. UNIX for Advanced & Expert Users

How to identify maximum stack size?

Hi All, I have set max stack size as 4KB for my thread, but it always using very less. So I like to know what is the maximum stack size is used by my thread. I tried with gcc -fstack-usage command line option, but its not supported by mips. Kindly suggest me the way to find the max stack... (6 Replies)
Discussion started by: rajamohan
6 Replies

4. AIX

maximum size of a ramdisk on AIX 5.3

Hi, Do you know what is the maximum size I can use to create a ramdisk on AIX 5.3? I m pretty sure i've seen somewhere i can use more than 2 Gb but I can't remember where. I need to do some recommandations for one of my customer and they'll need to create a ramdisk of 20 Gb. Can this be done? ... (1 Reply)
Discussion started by: cedric hanquez
1 Replies

5. UNIX for Dummies Questions & Answers

Maximum file size ????

Hi All, - block size of 512KB & every address requires 4 bits - The inode structure contains 10 direct pointers, 1 single indirect, 1 double indirect & 1 triple indirect pointer What could be the possible maximum file size for this system Any guess? I am unable to understand the question... (0 Replies)
Discussion started by: preethgideon
0 Replies

6. UNIX for Dummies Questions & Answers

maximum tar file size?

Is there a reasonable maximum limit for tar file sizes? I want to transfer a pile of files from one server to another but have restricted means, so tarring them first will probably be best... but how big can I go - both for the file format itself and for the operating system (linux) to handle? ... (7 Replies)
Discussion started by: Bobby
7 Replies

7. UNIX for Dummies Questions & Answers

Maximum size of a file in unix

What's the maximum file size supported by unix. (3 Replies)
Discussion started by: nagalenoj
3 Replies

8. HP-UX

Mailx Maximum attachment size

Hi friends, what is the maximum allowable attachment size, we can send using mailx command. what is an alternate option if my file is > than that size? thanks sreeji (0 Replies)
Discussion started by: sreejithau
0 Replies

9. UNIX for Dummies Questions & Answers

Maximum input file size in "Diff" Command

Hello, Can anyone let me know what is the maximum file size that can be given as input for the "Diff" Command in Unix? I have a file size as large as 28MB and which can also increase. Will I face any issues with such a file size. If yes, What is the other alternative. Thanks in advance for... (1 Reply)
Discussion started by: Neeraja
1 Replies

10. UNIX for Dummies Questions & Answers

Maximum size of sed file...

The sed -f option (reading sed commands from a file) seems to have a limit of 200 transactions per file. I can't see anything in the man pages about this restriction. I have a file with several thousand sed commands I need to perform (substitutions) - and while I can split the file into... (14 Replies)
Discussion started by: peter.herlihy
14 Replies
Login or Register to Ask a Question