LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 03: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, 04:30 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,919

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
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, 12:43 PM   #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, 12:54 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,919

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
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, 01: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, 01:14 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,919

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
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, 01:41 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
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, 04:12 AM   #8
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 273Reputation: 273Reputation: 273
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 04:14 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:35 PM
How to Partition Apache and MySQL Database (IBM X3650 M3 6x300GB SAS) albie17 Linux - Newbie 1 12-17-2010 11:10 PM
Steps to become a Database Administrator latinmusic74 General 10 04-22-2009 03: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 06:01 PM
Difference between Oracle Server and Oracle Database ganninu Programming 3 02-27-2007 02:06 AM


All times are GMT -5. The time now is 01:57 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration