Solved

how to tell a script to write to a new repository location on disk storage?

Posted on 2009-04-09
3
359 Views
Last Modified: 2012-05-06
Currently, I have a script that writes log information to the following directory location, /opt/repository/log_files/ on the local disk partition /dev/sda1 .. What I would like is to have this script write to a more mutual location other than the local disk. In this case, I would have dedicated disk use only for repository log files, /dev/sdb and mount it to /mnt/repository.. How can I tell this script to write log information in the new directory location (/mnt/repository) while keeping the old location /opt/repository/log_files/
0
Comment
Question by:areyouready344
3 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 24113037
Are you talking about the output from the script? If so, use "exec" in the script with no program name but with redirection, e.g.:

exec >/mnt/repository/xxx 2>&1

or, to append:

exec >>/mnt/repository/xxx 2>&1

If your question was about something else, please post clarifying what it is you want to do
0
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24114333
can you post us the content of the script file?
0
 

Author Comment

by:areyouready344
ID: 24277630
The solution I used was to use an USB thumb device to store log files and then created a mount point to this USB device /USB_LOGS
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now