Solved

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

Posted on 2009-04-09
3
362 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

785 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