ftp to copy file within target machine


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ftp to copy file within target machine
# 1  
Old 08-16-2011
ftp to copy file within target machine

I have ftp'd to a machine and have to copy a file from one directory to other. I thought once I am logged in using ftp, cp command would do it. But when I run the cp command, I get the following:

ftp> cp * ../../../../maint/
usage: cp [ clear | safe | private ]

Is using cp the only/right option?

Thanks in advance!
# 2  
Old 08-16-2011
Run like this with !
Code:
! cp file file2

Some FTP Info url:
Code:
http://opcenter.cites.uiuc.edu/nas/nash/apps/ftp.html

# 3  
Old 08-17-2011
Thanks, I tried that but now I am getting:

ftp> ! cp testfile.zip ..
cp: cannot stat `testfile.zip': No such file or directory

Note that testfile.zip exists in the current directory.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script which will check the target file and folder exists and copy it

Hi All, I am a beginner in this and trying to write a shell script in linux which will : 1. Ask for a file name and check if its exists. 2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists. 3. If target folder... (3 Replies)
Discussion started by: ashish_neekhra
3 Replies

2. Linux

Unable to connect to Server machine from a client machine using ftp service

Hi, Could you please help me with the below issue.. I'm running RHEL6 OS on both server (192.168.0.10) and client machines (192.168.0.1). I'm trying to connect to server from the client machine using ftp service. I have installed vsftpd daemon on both the machines. I'm getting... (4 Replies)
Discussion started by: raosr020
4 Replies

3. Shell Programming and Scripting

How to inform the target that a file was delivered to the FTP directory?

Hi, I have a FTP server and a directory location where i will be FTPing the flat file. My requirement is After the flat file was generated to the location, i need to write some trigger file or something to inform them that the file was delivered to them. Please let me know how i can do... (2 Replies)
Discussion started by: srikanth_sagi
2 Replies

4. Solaris

I can't copy any file to any machine | abort problem | freezing

I want to copy tar file to another machine. tar size is 4gb. Firstly I tried copy to windows machine with ftp client but copy operation didn't start. Now I have tryied to copy to solaris machine command with scp but copy was freezed. Picture is attached.... (1 Reply)
Discussion started by: getrue
1 Replies

5. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

6. UNIX for Dummies Questions & Answers

how to copy a file without remove the contents of the target file?

Hello every body, Kindly support me to "copy a file without remove the contents of the target file" Thanks in advance. :) Ahmed Amer Cairo,Egypt (2 Replies)
Discussion started by: ahmedamer12
2 Replies

7. UNIX for Dummies Questions & Answers

Copy file from local machine to server?

I am logged into a server via SSH. There is a file on my desktop of my Windows PC I would like to put on that server. How do I do it? SCP looks the likely method but how does the server know where the file is on the local machine? Thanks. (2 Replies)
Discussion started by: Sepia
2 Replies

8. UNIX for Dummies Questions & Answers

Copy file from Remote Unix box to windows machine

Hi I need to copy a file from the remote unix server to windows machine. I read lot of thrad but didn't worked out. Requesting all to please help. (2 Replies)
Discussion started by: sameerspice
2 Replies

9. UNIX for Advanced & Expert Users

how can I copy a file from unix to window machine?

how can I copy a file from unix to window machine (and vice versa), if ftp is not available? please tell me what else is convenient? Thanks! (6 Replies)
Discussion started by: fredao
6 Replies

10. UNIX for Dummies Questions & Answers

calling script in target machine

I know that schedulers handle callign scripts on different machines. If I want to call a script that's on the target machine and know whether the script ran fine or not, can it be done in shell script? what kind of commands would that have? Thank you (1 Reply)
Discussion started by: bryan
1 Replies
Login or Register to Ask a Question