How to uncompress zip files in a remote server from a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to uncompress zip files in a remote server from a script
# 1  
Old 06-02-2006
Lightbulb How to uncompress zip files in a remote server from a script

Hi UNIX gurus,
the scenario is that i have written a script which takes as input a directory structure.
And after that a tar is made ,then zipped and FTP it to a server.But how do i uncompress it from my script as FTP doesnot support any uncompress command during FTP session.
I have to automate this process as in future i nedd to be able to make a tar file and FTP it to
20 application servers.And after transferring,uncompress these files there.

Plz help as soon as possibe......
Thanx,
Rahul Smilie
# 2  
Old 06-02-2006
u have to use rsh concept

using rsh , u can execute the commands on the Remote server.
check rsh syntax.
Using rsh u can execute the script file on Remote Server,U have to write the logic of doing unzipping and whetever in that script and keep it on remote server.
execute
rsh <usename> <Remote serverIP> <scriptname(put this in home of remote Server)>
check syntax
# 3  
Old 06-02-2006
You can always setup a cron/scheduled job on the Application servers that checks for ${directory}/${file}.tar.gz at a specified duration, if the file exists then tar xvfz/uncompress (whatever the method may be).



Quote:
Originally Posted by rahul26
Hi UNIX gurus,
the scenario is that i have written a script which takes as input a directory structure.
And after that a tar is made ,then zipped and FTP it to a server.But how do i uncompress it from my script as FTP doesnot support any uncompress command during FTP session.
I have to automate this process as in future i nedd to be able to make a tar file and FTP it to
20 application servers.And after transferring,uncompress these files there.

Plz help as soon as possibe......
Thanx,
Rahul Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script connect to remote server, not find files and exit only from remote server, but not from scrip

I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies

2. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies

3. Shell Programming and Scripting

Shell script to find the GB files in /tmp directory in remote server

Hi, i need help on shell scripting. Main intention of the script is step 1: ssh to remote server Step 2: cd /tmp in remote server Step 3: in tmp i want to grep only files and directories which are in GB sizes All the servers list file is - tmpsrv.txt vi tmpsrv.txt ... (17 Replies)
Discussion started by: kumar85shiv
17 Replies

4. Solaris

Script to get files from remote server to local server through sftp without prompting for password

Hi, I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script. Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies

5. Shell Programming and Scripting

Ssh to get files from server A and zip in server B

Hi, I have read & write access in Unix box A and read access in Unix box B. I want a folder to be zipped from box B and sftp-ed in box A. Is there a remote scripting to achieve this? (2 Replies)
Discussion started by: Prasannag87
2 Replies

6. UNIX for Dummies Questions & Answers

compare zip files from a local to remote server

Good evening I need your help pease I know there are 2 commands(diff, or cp) to compare files in a directory. but the question arises: 1. can i compare zip files or ive got to unzip them? 2. how can i compare 2 files from a local to a remote server? (is there any special commad or ive got... (4 Replies)
Discussion started by: alexcol
4 Replies

7. Shell Programming and Scripting

Shell script required to uncompress and untar files

I need a shell script to Uncompress untar all the files present in the directory (it should Uncompress an untar files present in its sub folders also) In my work I get lots of tar files to untar and update the server, for this each time in need to type Step1) “ Uncompress xyz1-3.tar.z”... (2 Replies)
Discussion started by: arewe
2 Replies

8. UNIX Desktop Questions & Answers

file zip,rar,tar,compress,uncompress,unzip,unrar

i want know how to compress and uncompress file using unix, compress uncompress,zip,unzip,rar,unrar,how its work and more about this.:confused: (1 Reply)
Discussion started by: ismael xavier
1 Replies

9. Shell Programming and Scripting

FTP multiple files from remote server to local server

Hi, I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)
Discussion started by: berlin_germany
2 Replies

10. UNIX for Dummies Questions & Answers

How to uncompress .zip file?

Hi all, Can anyone tell me what tools / command can use to uncompress those *.zip file in HP-UX, thx. Bgds, Gordon (7 Replies)
Discussion started by: fonggo
7 Replies
Login or Register to Ask a Question