I want to create a script that emails a file created by Informix Ace if the file size is > 0. It is a list of exceptions. No exceptions...no message
This does not work:
THESIZE=`ls -lA /tmp/ds_treo.txt | awk -F' ' '{print $5}'`
if
then
(cat $DSDIR/ds_treo.txt) | mail -s "Treo... (1 Reply)
Hi
how can it be that say i have text (xls) file that is 661 bytes when i upload it to Solaris ftp its becomes 650 byes
and when i downloading it back its again 661 bytes
both in my local pc and Solaris ftp the file remains not corrupted and valid (2 Replies)
Hi All,
We have the commands top and ps through which we can find out the size of the running process.
These commnds are giving the size of my process in MB after rounding of the size.
Is there any way by which I can get the size of my process in Bytes or KBytes.
Any help would be greatly... (2 Replies)
Hi,
i need to know regarding the size type of the files in unix environment..
whether a files or directory will store in which format? kb or bytes ?
please answer to my question...
thanks & regards,
kamal (1 Reply)
Hi,
I would like to see the file list which contains the data.
Ex : - When I enter the "ls -ltr" command it will show all the files which are exists in the directory, But I want only those files list which are non zero byte by using only ls command.
I knew that I can write a script with... (12 Replies)
Hi guys,
I need to do 100 files comparison after I sorted the files. There are no specific key for sorting so i plan to arrange the files based on the file size. The command that i used to sort the files by size is as per below:-
ls -l | sort +4rn | awk '{print $5, $9}'
The problem that i... (3 Replies)
While running script I am getting an error like
Few lines in data are not being processed.
After googling it I came to know that adding such line would give some memory to it
ini_set("memory_limit","64M");
my input file size is 1 GB.
Is that memory limit is based on RAM we have on... (1 Reply)
Hey guys I'm new to unix and need help printing files in a specified directory according to size in bytes as well as files with equal bites in alphabetical order
the part i have done so far prints out all files in the directory as well as setting a time limit in which they have been modified
... (2 Replies)
Hello guys. I really hope someone will help me with this one..
So, I have to write this script who:
- creates a file home/student/vmdisk of 10 mb
- formats that file to ext3
- mounts that partition to /mnt/partition
- creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies
LEARN ABOUT SUSE
shrinkfile
SHRINKFILE(1) General Commands Manual SHRINKFILE(1)NAME
shrinkfile - shrink a file on a line boundary
SYNOPSIS
shrinkfile [ -n ] [ -m maxsize ] [ -s size ] [ -v ] file...
DESCRIPTION
The shrinkfile program shrinks files to a given size if the size is larger than maxsize, preserving the data at the end of the file. Trun-
cation is performed on line boundaries, where a line is a series of bytes ending with a newline, ``
''. There is no line length restric-
tion and files may contain any binary data.
Temporary files are created in the <pathtmp in inn.conf> directory. The ``TMPDIR'' environment variable may be used to specify a different
directory.
A newline will be added to any non-empty file that does not end with a newline. The maximum file size will not be exceeded by this addi-
tion.
OPTIONS -s By default, size is assumed to be zero and files are truncated to zero bytes. By default, maxsize is the same as size. If maxsize
is less than size, maxsize is reset to size. The ``-s'' flag may be used to change the truncation size. Because the program trun-
cates only on line boundaries, the final size may be smaller then the specified truncation size. The size and maxsize parameter may
end with a ``k'', ``m'', or ``g'', indicating kilobyte (1024), megabyte (1048576) or gigabyte (1073741824) lengths. Uppercase let-
ters are also allowed. The maximum file size is 2147483647 bytes.
-v If the ``-v'' flag is used, then shrinkfile will print a status line if a file was shrunk.
-n If the ``-n'' flag is used, then shrinkfile will exit 0 if any file is larger than maxsize and exit 1 otherwise. No files will be
altered.
EXAMPLES
Example usage:
shrinkfile -s 4m curds
shrinkfile -s 1g -v whey
shrinkfile -s 500k -m 4m -v curds whey
if shrinkfile -n -s 100m whey; then echo whey is way too big; fi
HISTORY
Written by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews.
SEE ALSO inn.conf(5)SHRINKFILE(1)