Sponsored Content
Full Discussion: max. size of file
Operating Systems Solaris max. size of file Post 302122338 by suresh_chinwin on Wednesday 20th of June 2007 05:51:54 AM
Old 06-20-2007
max file size in unix

The max file size in unix is determined by the ulimit option. The ulimit stands for user limit which specifies the largest file that can be created by the user.

$ulimit

2097152

means that the max size of a file that can be created is 2097152 bytes or 2048 KB.

We can also reset the ulimit value

$ulimit=1 specifies that the user limit is now 512 bytes(1 refers to 512 block) and is only active for this session.

A normal user can decrease the ulimit value but only the superuser(root) has the permissions to increase this value.

Hope this clears your doubt. Thank you.

Suresh.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

setting max log file size...

Hello all! I have found a new home, this place is great! I have been searching for days to find a way to set a max size for a log.txt file using a cron job exicuting a shell script. Is it possible for a script to remove older entries in a log file to maintain a limited file size? If so,... (5 Replies)
Discussion started by: v-rod
5 Replies

2. Shell Programming and Scripting

Max size of variable

What is the maximum amount of characters that you can have in a varible name in the ksh shell? (1 Reply)
Discussion started by: lesstjm
1 Replies

3. UNIX for Dummies Questions & Answers

Max I/O Size

My HP-UX 11.0 system is supporting an Oracle database. I have found a number of references on the Net to the "Max I/O size" in relation to setting Oracle parameters. How can I tell what my max i/o size is? I originally made the assumption that it was referring to my stripe size but now I think... (1 Reply)
Discussion started by: keelba
1 Replies

4. Programming

Max file size can't exceed 2 GB

We have Sun OS 5.9 we are doing a backup process (ProC program) that uses the function... fprintf(fp,"%s;%s;%s;%s;%s;%ld;%ld;%ld;%ld;%s;%s;%s;%d;%s;%s;%s;%ld;%s;%s;%s;%ld;%ld;%s;%ld;%s;%ld;%s;%s;%c%c",x_contrno, x_subno, x_b_subno,x_transdate,x_last_traffic_date,BillAmt_s, x_billamount_int,... (10 Replies)
Discussion started by: atiato
10 Replies

5. UNIX for Advanced & Expert Users

How to determine the max file size

Does anyone know a way to determine the maximum filesize on a file system on Solaris, HP-UX, AIX, Linux, and OSF1 using the command line? TIA (2 Replies)
Discussion started by: dknight
2 Replies

6. UNIX for Advanced & Expert Users

Max. file size

i want to know what is the maximum file size supported by linux with ext3 file system. (1 Reply)
Discussion started by: nagalenoj
1 Replies

7. UNIX for Dummies Questions & Answers

MAX file size limited to 2GB

Hi All, We are running HP rp7400 box with hpux 11iv1. Recently, we changed 3 kernel parameters a) msgseg from 32560 to 32767 b) msgmnb from 65536 to 65535 c) msgssz from 128 to 256 Then we noticed that all application debug file size increase upto 2GB then it stops. So far we did not... (1 Reply)
Discussion started by: mhbd
1 Replies

8. UNIX for Advanced & Expert Users

Max size of the attachment

Hi Gurus, I am unable to send a file which size is more than 10mb through the "sendmail" command in unix. I searched from internet and followed the path specified over there "/etc/mail/sendmail.cf" and too "/etc/mail/main.cf" but found in those files below lines. # maximum message size... (1 Reply)
Discussion started by: sanjay.login
1 Replies

9. UNIX for Dummies Questions & Answers

Restrict Max file size

Hello All, I am working on an issue, where I need to check the max file size of a file. If the file size exceeds 2 GB, then I need to generate an error message. Since the file system does not allow a file to be created larger than 2 GB, I am planning to use named pipes & AWK file to acheive my... (6 Replies)
Discussion started by: puru2121
6 Replies

10. Solaris

Clamd max file size Solaris 10

Hi, I've compiled a 64-bit version of ClamAV 0.98.7 on my Solaris 10 SPARC server. I have a selection of files all containing the eicar signature but clamd is only picking up the signature in the files <2GB. I have the following set in clamd.conf, to remove file size checking: MaxScanSize 0... (4 Replies)
Discussion started by: Troutfest
4 Replies
ulimit(2)							   System Calls 							 ulimit(2)

NAME
ulimit - get and set process limits SYNOPSIS
#include <ulimit.h> long ulimit(int cmd, /* newlimit */...); DESCRIPTION
The ulimit() function provides for control over process limits. It is effective in limiting the growth of regular files. Pipes are limited to PIPE_MAX bytes. The cmd values, defined in <ulimit.h>, include: UL_GETFSIZE Return the soft file size limit of the process. The limit is in units of 512-byte blocks and is inherited by child pro- cesses. Files of any size can be read. The return value is the integer part of the soft file size limit divided by 512. If the result cannot be represented as a long int, the result is unspecified. UL_SETFSIZE Set the hard and soft file size limits for output operations of the process to the value of the second argument, taken as a long int. Any process may decrease its own hard limit, but only a process with appropriate privileges may increase the limit. The new file size limit is returned. The hard and soft file size limits are set to the specified value multiplied by 512. If the result would overflow an rlimit_t, the actual value set is unspecified. UL_GMEMLIM Get the maximum possible break value (see brk(2)). UL_GDESLIM Get the current value of the maximum number of open files per process configured in the system. RETURN VALUES
Upon successful completion, ulimit() returns the value of the requested limit. Otherwise, -1 is returned, the limit is not changed, and errno is set to indicate the error. ERRORS
The ulimit() function will fail if: EINVAL The cmd argument is not valid. EPERM A process that has not asserted {PRIV_SYS_RESOURCE} in its effective set is trying to increase its file size limit. USAGE
Since all return values are permissible in a successful situation, an application wishing to check for error situations should set errno to 0, then call ulimit(), and if it returns -1, check if errno is non-zero. The getrlimit() and setrlimit() functions provide a more general interface for controlling process limits, and are preferred over ulimit(). See getrlimit(2). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
brk(2), getrlimit(2), write(2), attributes(5), privileges(5), standards(5) SunOS 5.10 1 Feb 2003 ulimit(2)
All times are GMT -4. The time now is 09:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy