Say folder archive/ contains many folder each created on a day. this folder may contain files. i want to write a script to delete all the folder inside archive/ which are 7 days older. i used the below script for the reason.
find archive -mtime +7 -type d -exec rm -r {} \;
pls suggest me if... (3 Replies)
Greetings!
I have multiple files, one per subdirectory, all with the same file name. All subdirectories are one level deep from the main directory.
The data in the files is tab delimited between fields and record delimited with a newline.
The subdirectory names have the date in the... (5 Replies)
Hi Frnds,
I have to list the files which are older than 7 days in the given directory.
it should consider only the files and should not show subdirectories.
Thanks,
Raja (3 Replies)
Hi All,
I am not one of the super users / root for AIX 5.3 system.
There is a filesystem
Say
/DIR1 and its has several subdirs in it say SUBDIR1, SUBDIR2, SUBDIR3.
Can I create a tar file for all files under DIR1 and SUBDIR1, SUBDIR3. Excluding SIBDIR2?
Also how can I preserve... (2 Replies)
Hello Comunity
I am trying to make a bash shell script that it copies files and subdirs(with files) to a new dir. I would like the dest_dir to contain only subdirectories with files not other subdirs inside.
it called : cpflatdir src_dir dest_dir
Pleaze help me!
Thank you in... (2 Replies)
Hi all,
Thanks for previous help.
How to include this in script,
I need to tar files which are present in /var/spool/cron/crontabs directory (used for crontab) excluding those files which are having extension .au
/var/spool/cron/crontabs>>ls -ltr | grep -v .au
total 438
-rw------- 1... (11 Replies)
Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file.
so 1 script should only list files older than 365 days for each directory separately to a folder
The other script should read these files... (7 Replies)
I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {}
But the ls command is the working on the files which have white... (16 Replies)
Hello all,
I want to list the files older than 10 days. Currently am using
find ./ -mtime +10 -exec ls -ltr {} \;
command. But I want to execute the same command in 16 directories at a time and want an output asking to remove those file?
Please help me to design the script.
regards,
Ajay (3 Replies)
Hello all,
do you know any way i can i move folders and its content if folder is older than 1,5 days in bash?
I tried:
find /home/xyz/DATA/* -type d -ctime +1.5 -exec mv "{}" /home/xyz/move_data_here/ \;All i got was that Files from DATA /home/xyz/DATA/* ended messed up in... (1 Reply)
Discussion started by: ZerO13
1 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)