Sponsored Content
Full Discussion: File size limit
Operating Systems Solaris File size limit Post 78201 by frustrated1 on Sunday 17th of July 2005 09:11:45 AM
Old 07-17-2005
File size limit

I want to have a permanent file created - and limit the size that this file can grow.. I want a circular file..

ie max size of file is 10 mb.. and if any new data written to file the oldest data removed..

How can I do this?

I am on solaris 9 x86
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Limit size of the file

How do I limit size of a file to 1 MB or something like that under Linux? (4 Replies)
Discussion started by: _hp_
4 Replies

2. AIX

file size limit

Can anybody help me? How to increase file size limit in aix 5.2? I have already specified in /etc/security/limits file : default: fsize = -1 core = 2097151 cpu = -1 data = -1 rss = -1 stack = -1 nofiles = 2000 (2 Replies)
Discussion started by: vjm
2 Replies

3. Programming

File size limit exceeded

When i run my C program which dynamically creates the output file, the program stops after sometime and gives the error "File size limit exceeded" even though my working directory has space.Can anyone plz help me out. (13 Replies)
Discussion started by: drshah
13 Replies

4. UNIX for Advanced & Expert Users

File Size Limit

Hi, I have a problem writing or copying a file 2GB or larger to either the second or third disk on my C8000. I've searched this forum and found some good information on this but still nothing to solve the problem. I'm running hpux 11i, JFS3.3 and disk version 4 (from fstyp) on all 3 disks. ... (2 Replies)
Discussion started by: HaidoodFaulkauf
2 Replies

5. UNIX for Dummies Questions & Answers

Size limit for FTPing file

Is there any size limit for FTPing file from one unix system to another? (6 Replies)
Discussion started by: swarup2008
6 Replies

6. Shell Programming and Scripting

awk file size limit

My code is awk '{ out=split(FILENAME,a,"/") sub(/\./,"_",a) sub(/\-/,"_",a) NEWSTRING="main_"a"_"a"(" # The word we want to insert gsub(/main\(/,NEWSTRING); # the word to be replaced print "Main becomes ",NEWSTRING")","in file ",FILENAME >> "/home/ds2/test/NEW2.txt" ... (4 Replies)
Discussion started by: senior_ahmed
4 Replies

7. UNIX for Advanced & Expert Users

file size limit?

hi, how can I find out what the limit of a file size is on unix? thanks (6 Replies)
Discussion started by: JamesByars
6 Replies

8. Shell Programming and Scripting

sftp file size limit

Hi, Can some one please tell me the file size limit (if any) while using sftp I am trying to transfer a file ( size is almost 350 MB ) but it fails as shown below. sftp> put file1 ./file1 Uploading file1 to /dir1/./file1 file1 25% 100MB 10.2MB/s 00:28 ETA Couldn't write to remote... (6 Replies)
Discussion started by: vikash_k
6 Replies

9. Shell Programming and Scripting

Limit on a File size.

Hi All, I want to store 32KB of file in Oracle DB into CLOB field. I am not able to insert more than 32KB of file into CLOB. So i want to put a limit on the file size. I am using k shell. My file size will dynamically increase its size, i want to check the file size if it is more than 32KB... (1 Reply)
Discussion started by: rajeshorpu
1 Replies

10. HP-UX

2GB file size limit

Greetings, I'm attempting to dump a filesystem from a RHEL5 Linux server to a VXFS filesystem on an HP-UX server. The VXFS filesystem is large file enabled and I've confirmed that I can copy/scp a file >2GB to the filesystem. # fsadm -F vxfs /os_dumps largefiles # mkfs -F vxfs -m... (12 Replies)
Discussion started by: bkimura
12 Replies
GETRLIMIT(2)							System Calls Manual						      GETRLIMIT(2)

NAME
getrlimit, setrlimit - control maximum system resource consumption SYNOPSIS
#include <sys/time.h> #include <sys/resource.h> getrlimit(resource, rlp) int resource; struct rlimit *rlp; setrlimit(resource, rlp) int resource; struct rlimit *rlp; DESCRIPTION
Limits on the consumption of system resources by the current process and each process it creates may be obtained with the getrlimit call, and set with the setrlimit call. The resource parameter is one of the following: RLIMIT_CPU the maximum amount of cpu time (in seconds) to be used by each process. RLIMIT_FSIZE the largest size, in bytes, of any single file that may be created. RLIMIT_DATA the maximum size, in bytes, of the data segment for a process; this defines how far a program may extend its break with the sbrk(2) system call. RLIMIT_STACK the maximum size, in bytes, of the stack segment for a process; this defines how far a program's stack segment may be extended. Stack extension is performed automatically by the system. RLIMIT_CORE the largest size, in bytes, of a core file that may be created. RLIMIT_RSS the maximum size, in bytes, to which a process's resident set size may grow. This imposes a limit on the amount of physi- cal memory to be given to a process; if memory is tight, the system will prefer to take memory from processes that are exceeding their declared resident set size. A resource limit is specified as a soft limit and a hard limit. When a soft limit is exceeded a process may receive a signal (for example, if the cpu time is exceeded), but it will be allowed to continue execution until it reaches the hard limit (or modifies its resource limit). The rlimit structure is used to specify the hard and soft limits on a resource, struct rlimit { int rlim_cur; /* current (soft) limit */ int rlim_max; /* hard limit */ }; Only the super-user may raise the maximum limits. Other users may only alter rlim_cur within the range from 0 to rlim_max or (irre- versibly) lower rlim_max. An "infinite" value for a limit is defined as RLIM_INFINITY (0x7fffffff). Because this information is stored in the per-process information, this system call must be executed directly by the shell if it is to affect all future processes created by the shell; limit is thus a built-in command to csh(1). The system refuses to extend the data or stack space when the limits would be exceeded in the normal way: a break call fails if the data space limit is reached. When the stack limit is reached, the process receives a segmentation fault (SIGSEGV); if this signal is not caught by a handler using the signal stack, this signal will kill the process. A file I/O operation that would create a file that is too large will cause a signal SIGXFSZ to be generated; this normally terminates the process, but may be caught. When the soft cpu time limit is exceeded, a signal SIGXCPU is sent to the offending process. RETURN VALUE
A 0 return value indicates that the call succeeded, changing or returning the resource limit. A return value of -1 indicates that an error occurred, and an error code is stored in the global location errno. ERRORS
The possible errors are: [EFAULT] The address specified for rlp is invalid. [EPERM] The limit specified to setrlimit would have raised the maximum limit value, and the caller is not the super-user. SEE ALSO
csh(1), quota(2), sigvec(2), sigstack(2) BUGS
There should be limit and unlimit commands in sh(1) as well as in csh. 4th Berkeley Distribution May 13, 1986 GETRLIMIT(2)
All times are GMT -4. The time now is 08:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy