Has anyone written a script in Perl for doing copy and renaming files...?
here's the scenario...
1) We have a mountpoint (/tmp/foo) in Solaris 9 (Server A) where a file gets created and this same mount point exist on Server B as a nfs "ro" mountpoint (/tmp/foo) . The script run every 30 minutes on Server B and checks for any new files that were created on mountpoint foo.
2) Scripts find that new files were created and checks for any existing files on mountpoint (/tmp/bar) on Server B. If the file exists, then it renames the existing file with the timestamp at the end of the file. If the files doesn't exist it just simply copies it on /tmp/bar. None of the files should ever be deleted from anywhere.
I'm sorry that I'm asking for help in such a manner, but I'm out of time and this was just given to me about 2 days ago. To make matter worse I'm not that savvy with perl and there is no way I could come up with it by the end of this week.
thanks
here's the scenario...
1) We have a mountpoint (/tmp/foo) in Solaris 9 (Server A) where a file gets created and this same mount point exist on Server B as a nfs "ro" mountpoint (/tmp/foo) . The script run every 30 minutes on Server B and checks for any new files that were created on mountpoint foo.
2) Scripts find that new files were created and checks for any existing files on mountpoint (/tmp/bar) on Server B. If the file exists, then it renames the existing file with the timestamp at the end of the file. If the files doesn't exist it just simply copies it on /tmp/bar. None of the files should ever be deleted from anywhere.
I'm sorry that I'm asking for help in such a manner, but I'm out of time and this was just given to me about 2 days ago. To make matter worse I'm not that savvy with perl and there is no way I could come up with it by the end of this week.
thanks