LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I am an Oracle Database Administrator working in a SAS environment (https://www.linuxquestions.org/questions/linux-newbie-8/i-am-an-oracle-database-administrator-working-in-a-sas-environment-4175475223/)

aigberay 08-29-2013 03:52 PM

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.

TB0ne 08-29-2013 04:30 PM

Quote:

Originally Posted by aigberay (Post 5018452)
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.

aigberay 09-11-2013 12:43 PM

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.

TB0ne 09-11-2013 12:54 PM

Quote:

Originally Posted by aigberay (Post 5025936)
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

aigberay 09-11-2013 01:04 PM

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.

TB0ne 09-11-2013 01:14 PM

Quote:

Originally Posted by aigberay (Post 5025946)
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'.

unSpawn 09-11-2013 01:41 PM

Quote:

Originally Posted by aigberay (Post 5018452)
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

kooru 09-12-2013 04:12 AM

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


All times are GMT -5. The time now is 03:56 AM.