12-15-2016
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need a unix script that will check the size of multiple files in the same directory or from a text file. (6 Replies)
Discussion started by: alnita
6 Replies
2. Shell Programming and Scripting
How can I perform size check of any character file(which switch)?
For example: I have to perform certain actions if file size is not zero. How can I do that?
Is this syntax fine?
if test ! -z $filename
then
fi (2 Replies)
Discussion started by: malaymaru
2 Replies
3. Shell Programming and Scripting
Hi All,
I am in small problem..
i have one script which transfers some big files to my ftp usign normal command like put ....
my problem is how to check whether my file have been transferred successfully on ftp or not...
i know only inside ftp we have option like 'size' command which... (2 Replies)
Discussion started by: Shahul
2 Replies
4. Shell Programming and Scripting
I have following script on AIX/KSH
if ] ; then
echo "filename exists and is > 0 bytes"
else
echo "filename does not exist or is zero length"
fi
It is not working. What is wrong here??? (3 Replies)
Discussion started by: Hangman2
3 Replies
5. Shell Programming and Scripting
I want to write a batch job (ksh) with the following requirement
we have file feeds coming to our system from other team,
if the file size is greater than expected then we dont need to process the file for the day
and need to archive the file and send email notification to the manager saying... (5 Replies)
Discussion started by: sithara
5 Replies
6. Shell Programming and Scripting
if ; then
cp /tmp/testfolder/*.* ~/new/logs/
else
echo "No files today"
exit
fi
The problem is this doen't work when there is more than 1 file. Please tell me how to
take the latest file and check the size of the file in a directory (1 Reply)
Discussion started by: sandy1028
1 Replies
7. Shell Programming and Scripting
Hi,
Following script work fine:
#!/bin/bash
FILE=$1
if ; then
echo Yay
else
echo Boo
fi
But I would like to add another condition that if FILE... (3 Replies)
Discussion started by: nrjrasaxena
3 Replies
8. Shell Programming and Scripting
I'm doing a script thats check if mylogfile.log is bigger then 5000 but i dont know how to write it.
thanks in avance. (6 Replies)
Discussion started by: Froob
6 Replies
9. Shell Programming and Scripting
I am trying to check whether two files are empty or not using below if condition but its checking for only one file
if ]
Again I tried
if && ]
Need your assistance (2 Replies)
Discussion started by: Aditya_001
2 Replies
LEARN ABOUT OPENSOLARIS
ulimit
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.11 1 Feb 2003 ulimit(2)