.... and so on .. D server contains directories like :-
drwxrwxr-x 23 smbnull sys 4096 Feb 23 03:13 aix
drwxrwxr-x 3 smbnull sys 4096 Feb 22 04:52 hpux
drwxrwxr-x 3 smbnull sys 4096 Feb 22 05:02 linux
drwxrwxr-x 3 smbnull sys 4096 Feb 23 09:41 vio
Inside this lot of other dir/files ..
So I need to create files and directories (with same content)as we can see in D server to P server. I am using a mail parsing mechanism to create files and directories in P server. It is like :-
on D server got to place where you did find command
$ tar zcvf vio.tgz vio/
if you have scp/rcp/ftp allowed it is much easier
copy all the files to P server
if you have to mail ... remember you cannot mail like you do for text file.
you need to encode the file before you email.
uuencode vio.tgz vio.tgz | mail chakrapani@newsasnow.com -s "Dev dump"
now on production server
$ tar zxvf vio.tgz
Please note command carefully
tar - create tar archive
z - Gzip it
c - CREATE (which is done on DEV D server)
v - verify show what it has done ...
f -- file to be used
x - extract (which is done on PROD server)
if you need a script decide how files are compressed and rcvd on production. also verify userid permission etc before you copy etc ...
there are easier ways like rsync to copy files and cvs/version control etc to make it structured ...
No, I have to do email parsing since i dont have access to P server. I can only use email parsing...
I have got the idea but dont know how to implement ..
Algorithm will be like :-
1) find . will give all the files and dir in the desired location
2) store the o/p to an array
3) if it is a dir --> use parsing method to create dir
4) if it is a file --> use parsing method to create file
and so on ..
This is the logic i want ..
Please help me out to complete this since i am not familiar with array and all ....
It is not possible since i dont have access to create folders or dir in P server...
Please tell me how to read entries into an array .
Example :-
/opt/src
/etc/sys
...
...
I need to store "/opt/src" as first element in the array and "/etc/sys" as second and so on ..
Then I need to check if the first element in the array is a dir .. then i will use email parsing to create the same in p server ..
Do you have unrestricted "root" access to Shell on both servers? If not, what access do you have?
What is the full hierarchial directory of the "vio" directory mentioned in post #1 ? Can you create directories and files under the parent directory on the target computer?
What in unix command terms is "email parsing".
Are you using some sort of enhanced unix mail on both servers? This question is about whether you can save a file attachment directly to the target server or have some other method in mind.
How big is the "vio" directory?
Does every file and directory owner have the same unix UID and GID on the source and target computers? This is so important when moving archives from one unix server to another. There are advanced techniques which include sorting out the UID and GID issues before creating the archive.
What Operating System and version are the source and target computers?
What Shell do you use on the source and target computers?
Footnote: Depending on what Operating Systems are revealed I'd be more likely to use "cpio" than "tar" because "cpio" will archive any type of file.