scp file and include directory info
Good morning. I have an issue with core files. They are showing up in different directories. I want to move them to another location however they are all named "core" so I need to attach the directory tree information so they can be identified later as to where they came from.
So far I have not been able to find a similar problem or solution. I did see an example of someone using the tree command however I did not understand what they were doing. so I want to scp the core files to a single directory on a different box /dir1/dir2/dir3/core /dir1/dir2/dir4/core /dir1/dir5/dir6/core Thanks in advance if somebody can help |
Here's some code (untested) that makes a new ssh call for every core file it copies (inconvenient if prompted for password)
You probably want to remove the original after the transfer. Code:
#! /usr/bin/perl -w |
Thanks. My hope is to run as a cron job so I would need and that does prompt for a password.
|
Sorry I was distracted. What I wanted to say is I need something that will not need human interaction. This has given me some ideas to persue.
|
I would try rsync
|
Thank you. I was not aware of the rsync command. I will study up on it and see if I can apply it. On first look though it seems that because the files have the same name they will be over written or modified anyway.
|
All times are GMT -5. The time now is 06:15 PM. |