Solved

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
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.

685 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