09-04-2005
Find files older than 5 days and remove tem after listing
need help with this ...
Find files older than 5 days and remove tem after listing
list "test" file older than 5 days and then remove them
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in.
How can this be done?? Find returns files that I do not want. (2 Replies)
Discussion started by: halo98
2 Replies
2. Shell Programming and Scripting
Hi,
I need to remove files (*.trc) which are older than 30 days from one location.
My problem is there I do not want to visit any of the directories at that location. I want to search files at that particular location only (need to skip directorys at that location). maxdepth option is there... (6 Replies)
Discussion started by: malaymaru
6 Replies
3. Shell Programming and Scripting
Hi,
I'm Eddy from Belgium and I've the following problem.
I try to write a ksh script in AIX to tar, compress and remove the original *.wav files from the directory belgacom_sf_messages older than two days with the following commands.
The problem is that I do not find a good combination... (4 Replies)
Discussion started by: edr
4 Replies
4. Shell Programming and Scripting
Dear Friends,
I have two queries.
1) I want to see the list of folders which were created 29 days ago.
2) I want to see the folders in which last created file is older than 29 days.
Can it be done?
Thank you in advance
Anushree (4 Replies)
Discussion started by: anushree.a
4 Replies
5. UNIX Desktop Questions & Answers
What command arguments I can use in unix to list files older than 10 days in my current directory, but I don't want to list the hidden files.
find . -type f -mtime +15 -print will work but, it is listing all the hidden files., which I don't want. (4 Replies)
Discussion started by: Pouchie1
4 Replies
6. Shell Programming and Scripting
Hi
I need help in the script which looks at a contorl file which has a list of file names like xxxx.12345 and I want to take only xxxxx and search in a specific directory and remove the file if its older than 60 days
I have written something like this.. but seems to be wrong... (1 Reply)
Discussion started by: antointoronto
1 Replies
7. UNIX for Advanced & Expert Users
Hello,
I have a script which finds files in a directory that are older than 30 days and remove them.
The problem is that these files are too many and when i run this command:
find * -mtime +30 | xargs rm
I run this command inside the directory and it returns the error:
/usr/bin/find:... (8 Replies)
Discussion started by: omonoiatis9
8 Replies
8. Shell Programming and Scripting
Hi All,
I am new to the scripting and using solaris 10 OS. Please suggest me from the below script which modifications need to be done to delete the files more that 2days older. Current script is deleting existing file.
# Remove old explorer runs if needed
DIR=`dirname ${EXP_TARGET}`
if ... (2 Replies)
Discussion started by: Navkreddy
2 Replies
9. Shell Programming and Scripting
Hi All,
Need help in identifying a shellscript command to remove all files on a server directory, starting with a certain prefix and also older than 3 days.
That means files created with that prefix, today or yesterday, shouldn't be removed.
Thanks,
Dev (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
10. Shell Programming and Scripting
Hi,
Could someone help me that what the problem is in this code?
#!/bin/sh
FOLDER=/abc/datasource/checkstatus
TIMESTAMP=$(date +%s)
for filename in $(find $FOLDER -maxdepth 1 -type f -name "CHECK_STATUS*"); do
f1=$($filename -Eo "{4}+")
f2=$(date -d "$f1" +%s)
if... (11 Replies)
Discussion started by: Home
11 Replies
LEARN ABOUT DEBIAN
check_backuppc
check_backuppc(8) System Manager's Manual check_backuppc(8)
NAME
check_backuppc - A Nagios plugin to monitor BackupPC
SYNOPSIS
check_backuppc [options]
DESCRIPTION
check_backuppc is a nagios plugin that reports on the status of BackupPC. By default, it monitors both archive and backup hosts for
errors.
OPTIONS
-a, --archive-only
Only check the status of archive hosts.
-b, --backup-only
Only check the status of non-archive hosts.
-s, --status-only
Only check the status of the backups, omit connection failures that are less than $Conf{FullPeriod} old.
-H, --hostname hostname
Only check the specified host. Uses hostnames that BackupPC is configured to use, can be specified multiple times.
-x, --exclude hostname
Do not check the specified host. Uses hostnames that BackupPC is configured to use, can be specified multiple times.
-w, --warning age
The days old at which a failure is considered a warning, default 1.
-c, --critical age
The days old at which a failure is considered critical, default 8.
-r, --reduce count
The maximum number of failed hosts for which to reduce reported severity, default 0.
-h, --help
Show summary of options.
NOTES
This plugin must be run on the same host and as the same user as BackupPC. An archive host only takes on a reported type of archive after
its first archive run.
EXAMPLES
/usr/local/lib/nagios/plugins/check_backuppc -r1 -w3 -c8 -b -x otter
Check the status of all backup hosts except "otter". Warn if a failed backup is older than three days old, return critical if a
failure is older than eight days old unless there is only a single failure. In that case, warn if the single failed backup is older
than eight days.
AUTHOR
Seneca Cunningham <tetragon@users.sourceforge.net>
SEE ALSO
sudo(8). backuppc(8).
check_backuppc(8)