Sponsored Content
Full Discussion: Restrict Max file size
Top Forums UNIX for Dummies Questions & Answers Restrict Max file size Post 302551070 by cero on Monday 29th of August 2011 09:24:58 AM
Old 08-29-2011
How is that file created/grown?
Do you have control of that process? If so you most likely can react on the return code.
Another way would be to check your systems logs for errormessages (that would be the only way that comes to my mind if you do not control the process) and some systems allow mail notification for errors.
This User Gave Thanks to cero For This Post:
 

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. 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

3. 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

4. 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

5. Solaris

max. size of file

I wants to ask that what is the max size of file that we can create in the unix file system. (2 Replies)
Discussion started by: sameerghogre
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. Shell Programming and Scripting

finding max size

Hi I have a list of 2000 records with multiple entries and I want to get the max size for each entry ABC 1 ABC 2 ABC 3 ABC 4 DEF 1 DEF 2 DEF 2 DEF 2 DEF 2 ... (9 Replies)
Discussion started by: Diya123
9 Replies

9. Shell Programming and Scripting

Max size directory

Hi I know that a perticular direxctory is cosuming max space . Filesystem 1K-blocks Used Available Use% Mounted on nfsfi02:/vol/fivol2/Dir2/dir 104857600 92671400 12186200 89% /fs/dir I want to know which sub directory is consuming max... (4 Replies)
Discussion started by: ptappeta
4 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
GETCWD(3)						     Linux Programmer's Manual							 GETCWD(3)

NAME
getcwd, getwd, get_current_dir_name - Get current working directory SYNOPSIS
#include <unistd.h> char *getcwd(char *buf, size_t size); char *getwd(char *buf); char *get_current_dir_name(void); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): getcwd(): _BSD_SOURCE || _XOPEN_SOURCE >= 500 get_current_dir_name(): _GNU_SOURCE DESCRIPTION
These functions return a null-terminated string containing an absolute pathname that is the current working directory of the calling process. The pathname is returned as the function result and via the argument buf, if present. The getcwd() function copies an absolute pathname of the current working directory to the array pointed to by buf, which is of length size. If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds size bytes, NULL is returned, and errno is set to ERANGE; an application should check for this error, and allocate a larger buffer if necessary. As an extension to the POSIX.1-2001 standard, Linux (libc4, libc5, glibc) getcwd() allocates the buffer dynamically using malloc(3) if buf is NULL. In this case, the allocated buffer has the length size unless size is zero, when buf is allocated as big as necessary. The call- er should free(3) the returned buffer. get_current_dir_name() will malloc(3) an array big enough to hold the absolute pathname of the current working directory. If the environ- ment variable PWD is set, and its value is correct, then that value will be returned. The caller should free(3) the returned buffer. getwd() does not malloc(3) any memory. The buf argument should be a pointer to an array at least PATH_MAX bytes long. If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds PATH_MAX bytes, NULL is returned, and errno is set to ENAMETOOLONG. (Note that on some systems, PATH_MAX may not be a compile-time constant; furthermore, its value may depend on the file system, see pathconf(3).) For portability and security reasons, use of getwd() is deprecated. RETURN VALUE
On success, these functions return a pointer to a string containing the pathname of the current working directory. In the case getcwd() and getwd() this is the same value as buf. On failure, these functions return NULL, and errno is set to indicate the error. The contents of the array pointed to by buf are undefined on error. ERRORS
EACCES Permission to read or search a component of the filename was denied. EFAULT buf points to a bad address. EINVAL The size argument is zero and buf is not a null pointer. EINVAL getwd(): buf is NULL. ENAMETOOLONG getwd(): The size of the null-terminated absolute pathname string exceeds PATH_MAX bytes. ENOENT The current working directory has been unlinked. ERANGE The size argument is less than the length of the absolute pathname of the working directory, including the terminating null byte. You need to allocate a bigger array and try again. CONFORMING TO
getcwd() conforms to POSIX.1-2001. Note however that POSIX.1-2001 leaves the behavior of getcwd() unspecified if buf is NULL. getwd() is present in POSIX.1-2001, but marked LEGACY. POSIX.1-2008 removes the specification of getwd(). Use getcwd() instead. POSIX.1-2001 does not define any errors for getwd(). get_current_dir_name() is a GNU extension. NOTES
Under Linux, the function getcwd() is a system call (since 2.1.92). On older systems it would query /proc/self/cwd. If both system call and proc file system are missing, a generic implementation is called. Only in that case can these calls fail under Linux with EACCES. These functions are often used to save the location of the current working directory for the purpose of returning to it later. Opening the current directory (".") and calling fchdir(2) to return is usually a faster and more reliable alternative when sufficiently many file descriptors are available, especially on platforms other than Linux. SEE ALSO
chdir(2), fchdir(2), open(2), unlink(2), free(3), malloc(3) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2009-03-31 GETCWD(3)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy