12-12-2009
Rather than fight any problems with scripting, on the SCO boxes I administer I create several directories in backup and move the data through them then off the system. Something like:
directories are /backup/current, /backup/1do, /backup/2do
using a cron job in the middle of the night:
rm /backup/2do/*
mv /backup/1do/* /backup/2do
mv /backup/current/* /backup/1do
On the ones where I keep a week's worth of backup the directories are weekday names. As a safety measure I check for the date of the backups in each directory weekly along with a check that the nightly burn was accomplished each night.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need o get yesterday's day of week but im not exactly sure. the actual name is what i want. I can do it with numbers but im not sure with words. (3 Replies)
Discussion started by: rcunn87
3 Replies
2. Shell Programming and Scripting
I am currently running the following Korn shell script which works fine:
#!/usr/bin/ksh
count=`db2 -x "select count(*) from schema.tablename"`
echo "count"
I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename... (9 Replies)
Discussion started by: sasaliasim
9 Replies
3. Shell Programming and Scripting
Dear All,
Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report.
to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
Discussion started by: tiger2000
2 Replies
4. Shell Programming and Scripting
Hi,
I want to compare today's date(DDMMYYYY) with yesterday(DDMMYYYY) from system date,if (today month = yesterday month) then execute alter query else do nothing.
The above requirement i want in Shell script(KSH)...
Can any one please help me?
Double post, continued here. (0 Replies)
Discussion started by: kumarmsk1331
0 Replies
5. Shell Programming and Scripting
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies
6. Shell Programming and Scripting
Hello All,
I am writing a script in Sun Solaris
I want the date for "day before yesterday", i got the yesterday's date by this command TZ=GMT+24 date +%b" "%d.
Please suggest me some code to get the date for day before yesterday (6 Replies)
Discussion started by: anand2308
6 Replies
7. Shell Programming and Scripting
Hi
I want to get tomorrow and yesterday date from date command. My shell is KSH and server is AIX. I tried several options, but unable to do. Please help on this.
Regards
Rajesh (5 Replies)
Discussion started by: rajeshmepco
5 Replies
8. Shell Programming and Scripting
Hello,
I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead.
Here's what I... (5 Replies)
Discussion started by: nbsparks
5 Replies
9. Shell Programming and Scripting
hi all,
How to compare two files whether they are same are not...? like i had my input files as 20141201_file.txt and 20141130_file2.txt
how to compare the above files based on date .. like todays file and yesterdays file...? (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies
LEARN ABOUT OSF1
strclean
strclean(8) System Manager's Manual strclean(8)
NAME
strclean - Removes outdated STREAMS error log files
SYNOPSIS
/usr/sbin/strclean [-d logdir] [-a age]
FLAGS
Specifies a maximum age in days for the STREAMS error log files if this not the default age of 3. The value of age must be an integer
greater than or less than 3. Specifies a directory for the location of the STREAMS error log files to be removed if this is not the
default directory /var/adm/streams.
DESCRIPTION
The strclean command cleans the STREAMS error logger directory of log files (error.mm-dd) that contain error messages sent by the STREAMS
log driver (strlog). If no other directory is specified (the logdir argument), the command removes error log files in the /var/adm/streams
directory. If no other age is specified (the age argument), the command removes error log files that have not been modified in 3 days.
The strclean command is executed by the cron daemon on a periodic basis.
EXAMPLES
To remove the day-old error log files from a directory called /tmp/streams, enter: strclean -d /tmp/streams -a 1
FILES
One or more error log file or files on which strclean operates. The mm.dd in the filename indicates the month and day of the messages con-
tained in the file.
RELATED INFORMATION
Commands: strerr(8), cron(8).
Interfaces: strlog(7). delim off
strclean(8)