LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2013, 02:52 PM   #1
aigberay
LQ Newbie
 
Registered: Aug 2013
Posts: 8

Rep: Reputation: Disabled
I am an Oracle Database Administrator working in a SAS environment


i want to know what script to write to keep 14 days of the archive logs from my SAS server in a new folder.
 
Old 08-29-2013, 03:30 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by aigberay View Post
i want to know what script to write to keep 14 days of the archive logs from my SAS server in a new folder.
No idea...you're the administrator, aren't you? You can write a script in any one of MANY languages, and run it manually or automatically. How you write it depends on the language...a bash script is different than a perl script, so the syntax is different.

You can EASILY find many bash tutorials...start there..there's even one in my posting signature. Read the man page on the find command, and on the mv command.
 
Old 09-11-2013, 11:43 AM   #3
aigberay
LQ Newbie
 
Registered: Aug 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Need help urgently please!!!

i am comparing bab_grid_userlist.txt file to /etc/passwd file for user ids. If there is a user id in the bab_grid_userlist.txt file that does not have a Unix id in the passwd file I want it to send an email to babunixserver@vision.com. This should be setup as a weekly job that runs on monday mornings. please any help on this one.
 
Old 09-11-2013, 11:54 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by aigberay View Post
i am comparing bab_grid_userlist.txt file to /etc/passwd file for user ids. If there is a user id in the bab_grid_userlist.txt file that does not have a Unix id in the passwd file I want it to send an email to babunixserver@vision.com. This should be setup as a weekly job that runs on monday mornings. please any help on this one.
First, this is NOT URGENT for ANYONE here. If you need 'urgent' help, then contact Oracle support, since you're paying for it.

And now that we know what you WANT, why don't you show us what YOU have done to accomplish it, and tell us where you're stuck? We're not going to write your scripts for you. Also, there are many examples on how to set up a cron job to run every Monday you can easily find with Google:
http://linux.die.net/man/5/crontab
 
Old 09-11-2013, 12:04 PM   #5
aigberay
LQ Newbie
 
Registered: Aug 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Need help urgently please!!!

i am comparing bab_grid_userlist.txt file to /etc/passwd file for user ids. If there is a user id in the bab_grid_userlist.txt file that does not have a Unix id in the passwd file I want it to send an email to babunixserver@vision.com. This should be setup as a weekly job that runs on monday mornings. please any help on this one.

---------- Post added 09-11-13 at 01:04 PM ----------

i am comparing bab_grid_userlist.txt file to /etc/passwd file for user ids. If there is a user id in the bab_grid_userlist.txt file that does not have a Unix id in the passwd file I want it to send an email to babunixserver@vision.com. This should be setup as a weekly job that runs on monday mornings. please any help on this one.

Thanks for your post, i know the crontab would go like this:
>@weekly 0 9 * * 1 /bin/execute/this/script.sh
but i just need to put the remaining pieces together to achieve my goals, like sending the user in d bab_grid_userlist.txt that does not have a Unix id in the passwd file to the email, some help please.
 
Old 09-11-2013, 12:14 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by aigberay View Post
i am comparing bab_grid_userlist.txt file to /etc/passwd file for user ids. If there is a user id in the bab_grid_userlist.txt file that does not have a Unix id in the passwd file I want it to send an email to babunixserver@vision.com. This should be setup as a weekly job that runs on monday mornings. please any help on this one.

Thanks for your post, i know the crontab would go like this:
>@weekly 0 9 * * 1 /bin/execute/this/script.sh

but i just need to put the remaining pieces together to achieve my goals, like sending the user in d bab_grid_userlist.txt that does not have a Unix id in the passwd file to the email, some help please.
Right...again, we understand what you WANT...but we will NOT write your scripts for you. AGAIN...post what script(s) you've written so far, and tell us where you're stuck. Until you do that, there's nothing we can help with.

So far, you've not shown that you've done ANY of the 'pieces'.
 
Old 09-11-2013, 12:41 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by aigberay View Post
i want to know what script to write to keep 14 days of the archive logs from my SAS server in a new folder.
Try start with this?
Code:
which logrotate && man logrotate
 
Old 09-12-2013, 03:12 AM   #8
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
You should post your code. There are different ways.
find and mv could be command useful for this issue.

Last edited by kooru; 09-12-2013 at 03:14 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to configure autostart of oracle database and oracle soa suite on linux bootup sumit.tambekar Linux - Newbie 2 01-24-2011 07:35 PM
How to Partition Apache and MySQL Database (IBM X3650 M3 6x300GB SAS) albie17 Linux - Newbie 1 12-17-2010 10:10 PM
Steps to become a Database Administrator latinmusic74 General 10 04-22-2009 02:00 PM
LXer: Oracle(R) Database Standard Edition One and Oracle Enterprise Linux on HP Set New World Record for Price Performance with TPC-C Benchmark LXer Syndicated Linux News 0 06-12-2007 05:01 PM
Difference between Oracle Server and Oracle Database ganninu Programming 3 02-27-2007 01:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration