03-26-2011
Delete 2 months before old files when we get alarm directory size > 90%
Please Help me
Question: - we manually moving/removing old files, when we are getting alarm as /dir1/dir2 size greater than 90%.
we manually moving/removing old files and reduce the file size to less than 90%
- I want to delete all 2months before old files once we get the thresh hold >= 90% in a single unix commands (or) background script delete old files automatically once we get the thresh hold >= 90%
I need your support
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I have a requirement like below,
I want to transfer few file of size > 5 Mb from one directory to anotehr directory. Please let me know the command how can i do that
Sorry if it looks silly
Senthil (6 Replies)
Discussion started by: skcontact
6 Replies
2. Shell Programming and Scripting
Guys,
My log files stored in the date format format below(log_20080714072942):
TIMESTAMP=`date +%Y%m%d%H%M%S`
LOG=/log/log_${TIMESTAMP}.log
I'm looking for a shell script which deletes all files which is older than 3 months from today.
Regards,
Bhagat (3 Replies)
Discussion started by: bhagat.singh-j
3 Replies
3. Shell Programming and Scripting
Hi,
Iam trying to delete 6 months old files.
Iam using the following script
-ctime +190 -type f -exec echo rm {} \;
Iam getting an error saying -ctime not found. (6 Replies)
Discussion started by: Sompalle Jalaja
6 Replies
4. Shell Programming and Scripting
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies
5. Shell Programming and Scripting
Hello Community!
Im newbie on shell programming and its my first post.
Im trying to make a bash shell script that it removes files of subdirectory.
it is called : rms -{g|l|b} size1 dir
-g means : remove file or files in dir that is above size1
-l means: remove file or files in dir that... (1 Reply)
Discussion started by: BTKBaaMMM
1 Replies
6. Shell Programming and Scripting
To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies
7. Shell Programming and Scripting
I need help. I have to create a script which will delete multiple directory (folders) that are two months old. Example, I have folders dated April, May, June and July. I have to delete folders April and May and retain June and July and as such that when the July month lapse, the folder June will be... (2 Replies)
Discussion started by: jasperux
2 Replies
8. Red Hat
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Discussion started by: zachs
7 Replies
9. Shell Programming and Scripting
I have a qnap TS259 that is running ubuntu. Have successfully setup back scripts that are initiated by cron.
I would like to create a couple scrypts that would operate on the recycle bins for both drives. Just want to be able to run the script manually that would walk through both directories... (13 Replies)
Discussion started by: mackconsult
13 Replies
10. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
LEARN ABOUT OPENSOLARIS
mlib_imagecopymask_fp
mlib_ImageCopyMask_Fp(3MLIB) mediaLib Library Functions mlib_ImageCopyMask_Fp(3MLIB)
NAME
mlib_ImageCopyMask_Fp - copy with mask, floating-point
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_ImageCopyMask_Fp(mlib_image *dst, const mlib_image *src,
const mlib_image *mask, const mlib_d64 *thresh);
DESCRIPTION
The mlib_ImageCopyMask_Fp() function copies one image to another image via a mask image by using it as a yes/no indicator. The data type of
the images can be MLIB_FLOAT or MLIB_DOUBLE.
It uses the following equation:
dst[x][y][i] = src[x][y][i] if mask[x][y][i] <= thresh[i]
dst[x][y][i] = dst[x][y][i] if mask[x][y][i] > thresh[i]
PARAMETERS
The function takes the following arguments:
dst Pointer to destination image.
src Pointer to source image.
mask Pointer to mask image.
thresh Threshold for the mask image. thresh[i] contains the threshold for channel i.
RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
mlib_ImageCopy(3MLIB), mlib_ImageCopyArea(3MLIB), mlib_ImageCopyMask(3MLIB), mlib_ImageCopySubimage(3MLIB), attributes(5)
SunOS 5.11 2 Mar 2007 mlib_ImageCopyMask_Fp(3MLIB)