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(3)						   BSD Library Functions Manual 						 ULIMIT(3)

NAME
ulimit -- get and set process limits LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <ulimit.h> long int ulimit(int cmd, ...); DESCRIPTION
The ulimit() function provides a method to query or alter resource limits of the calling process. The method to be performed is specified by the cmd argument; possible values are: UL_GETFSIZE Return the soft file size limit of the process. The value returned is in units of 512-byte blocks. If the result cannot be represented in an object of type long int, the result is unspecified. UL_SETFSIZE Set the hard and soft file size limits of the process to the value of the second argument passed, which is in units of 512-byte blocks, and which is expected to be of type long int. The new file size limit of the process is returned. Any process may decrease the limit, but raising it is only permitted if the caller is the super-user. If successful, the ulimit() function will not change the setting of errno. RETURN VALUES
If successful, the ulimit() function returns the value of the requested limit. Otherwise, it returns -1, sets errno to indicate an error, and the limit is not changed. Therefore, to detect an error condition applications should set errno to 0, call ulimit(), and check if -1 is returned and errno is non-zero. ERRORS
The ulimit() function will fail if: [EINVAL] The cmd argument is not valid. [EPERM] It was attempted to increase a limit, and the caller is not the super-user. SEE ALSO
getrlimit(2), setrlimit(2) STANDARDS
The ulimit() function conforms to X/Open System Interfaces and Headers Issue 5 (``XSH5'') and IEEE Std 1003.1-2001 (``POSIX.1''). It was marked as obsolete in the IEEE Std 1003.1-2008 (``POSIX.1'') revision, which recommended the use of getrlimit(2) and setrlimit(2) instead, noting that because ulimit() uses the type long rather than rlim_t, it may not be sufficient for file sizes on many current systems. BSD
April 30, 2010 BSD
All times are GMT -4. The time now is 04:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy