Unzip folder on remote machine


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unzip folder on remote machine
# 1  
Old 07-05-2009
Unzip folder on remote machine

Hi !

I am trying to automate FTP transfer of some folders from one unix machine (a) to another one (b).
I run my shell script on machine a.
The problem I face is how to unzip the folder at the machine b with script run in machine a.

My first question: Is there any way to do this ?

My second question: Is this a good approch to automate FTP transfer of folders to run the shell script on machine a ? What if I try to write a script that can be run on machne b? Which approach is the most used and optimal one?
Since the folders in machine a are under CM (clearcase), it will be some complication to get around Config Spec when I run the script from machine b.

Rgds
Bob
# 2  
Old 07-05-2009
use ssh to unzip a file on server b from server a..(it will ask password though) or establish a passwordless ssh connection(which is not adviced..
and for your second question you better run it from server a...

Last edited by vidyadhar85; 07-05-2009 at 04:56 PM..
# 3  
Old 07-05-2009
Quote:
Originally Posted by vidyadhar85
use ssh to unzip a file on server b from server a..(it will ask password though) or establish a passwordless ssh connection(which is not adviced..
and for your second question you better run it from server a...


Thank you vidyadhar85. Since I am new to the unix world, I need to check this again with you: Do you mean that FTP can not help me solving this problem ? Why is ssh better in this case?
# 4  
Old 07-05-2009
yes I afraid FTP won't help you to solve your problem....
as far as i know ssh will be a better option..
# 5  
Old 07-05-2009
Quote:
Originally Posted by vidyadhar85
yes I afraid FTP won't help you to solve your problem....
as far as i know ssh will be a better option..

Thanks, I appreciate it.

Rgds
Bob
# 6  
Old 07-06-2009
Sending zipped files from server (machine a) to Client (machine b) and unzip them by a command fom server o unzip them via ssh.
How does such a command look like n server?
Rgds
Bob
# 7  
Old 07-06-2009
Check out sftp or scp.

Here's a link that might be interesting:
SSH with Keys HOWTO: SSH with Keys in a console window
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Trying to share a folder between windows machine and VM

I was following the guide I found here for doing this and I reached the step where I added myself to the vboxsf group but I am still getting a permissions denied message when I try to get into the folder: ubuntu12@ubuntu12-VirtualBox: /media$ cd sf_Shared_files/ bash: cd: sf_Shared_files/:... (0 Replies)
Discussion started by: Circuits
0 Replies

2. Shell Programming and Scripting

Help with fetching the data from remote machine from my jumpbox(local machine)

Team, Presently i am running a script from my local box(i.e jumpbox) to all the remote machines.Basically fetching basic queries like pwd,mkdir,touch etc and i am able to successfully fetch it from my local machine.But when i want to check certain database related queries like the dbstat... (20 Replies)
Discussion started by: whizkidash
20 Replies

3. Red Hat

iptables applied in local machine, can't ssh remote machine after chain changed to DROP

I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99 Source Destination was UP, with IP 192.168.1.15. This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Discussion started by: babinlonston
2 Replies

4. UNIX for Advanced & Expert Users

FTP While transfering files to local machine to remote machine

Hi Am using unix Ksh Am getting the problem while transferring zero size files through the script . When i transfer zero size files from local machine to remote machine manually i can able to do it . My question its beause of zero size files am not able to transfer through script ? or its... (2 Replies)
Discussion started by: Venkatesh1
2 Replies

5. Shell Programming and Scripting

How to unzip files from the same folder?

Hi , I have two ear files in a single folder. the ear file contains same xml files named "File1.xml". how to unzip each file seperately using shell script? Thanks, Chella. (11 Replies)
Discussion started by: ckchelladurai
11 Replies

6. Shell Programming and Scripting

How to unzip files from folder in shell script (ksh)?

I have a folder (C:\shellprg\input\) containing .CSV, .zip, .gz files. 1] I want to find all .zip/.gz files from folder (C:\shellprg\input\). 2] unzip/uncompress files into the same folder (C:\shellprg\input\) through shell script. I am using below commands for unzip files, unzip <filename>... (2 Replies)
Discussion started by: Poonamol
2 Replies

7. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

8. Solaris

How to Copy Folder from one solaris machine to another?

Hi All, Can any body help for below query...... How to Copy Folder from one solaris machine to another? Thanks, (8 Replies)
Discussion started by: vaibhavvd
8 Replies

9. UNIX for Dummies Questions & Answers

unzip files in a different folder

hi , I am using this command to unzip files from a source unzip -o $source_dir -d $dest_dir butthe problem is that this command creates a new folder at the destination and unzips all the files in that folder. I dont want that extra folder. e.g source_dir= abc/myname.zip... (2 Replies)
Discussion started by: agarwalniru
2 Replies

10. Solaris

strange problem regarding zip/unzip from window to solaris machine

Hi , I faced a very strange problem when I unzip a zip file on my solaris workstation. Actually I wanted to transfer a folder, say it TEST which contains some sub-folders inside it from windows to solaris machine. So I zipped this folder to TEST.ZIP on my windows machine. Then from my... (11 Replies)
Discussion started by: Raj Kumar Arora
11 Replies
Login or Register to Ask a Question