Greetingz!
Let me make sure I understand your problem correctly;
Quote:
You need a script that will overwrite a set of known libraries in /usr/local/lib.
You need this done because you're going to call this new script from an existing script, or you're going to put the new script into cron.
Once you have this script, you will be able to SSH into another machine, so you can compile C code.
|
I
*really* don't think you want to overwrite files in
/usr/local/lib. That's just bad form, man.
Is SSH not working for you? Then you may have to define (or modify) your
LD_LIBRARY_PATH environment variable before you start SSH.
However, if I'm completely off-base here, and you're trying to SSH into a system and THEN over-write the contents of
/usr/local/lib, so you can compile something (that's looking for the libraries in
dvd/lib), then I would still suggest you set
LD_LIBRARY_PATH to
/path/to/dvd/lib. Only you would do that
*after* you logged in to the remote system via SSH.
However, if I'm really missing the point of your post, and assuming you have a known, always static (never changing) list of libraries to copy from
dvd/lib to
/usr/local/lib then you can do one of two things;
1) If you need to copy ALL libraries out of
dvd/lib to
/usr/local/lib
cp -Rvp /path/to/dvd/lib /usr/local/lib
(If you don't want to see all the output, read the
man page for
cp)
2) If you need to copy just a few files from
dvd/lib to
/usr/local/lib
a) create a text file somewhere (
/tmp is a good place) and put the following in it;
/path/to/dvd/lib/libarary.1.so.0.1
/path/to/dvd/lib/libarary.2.so.0.1
/path/to/dvd/lib/libarary.3.so.0.1
(Note: make sure you change that to the paths and filenames you really needed)
Once you have this text file in
/tmp (example:
/tmp/libby.list), throw the following into a script and run it;
for fname in $(cat /tmp/libby.list)
do
cp -p $fname /usr/local/lib
done
I really hope that helps. For more tips, click the links in my signature for great justice! (lrn2post)