Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am simply trying to copy a folder and rename it in the same directory

Attempted: cp -rfp folder folder-7-03

Terminal Reply: Invalid Request

I don't use terminal often as my FTP App is quite good. Thought I would have a go at it and now I see why I was always discouraged. Still, I would like to know since I realize the power of Terminal.

Please review the status if it's helpful here:

Connected and logged into saidwebsite.com.

No proxy connection.

Gate ftp: off, server (none), port ftpgate.

Passive mode: on; fallback to active mode: on.

Mode: stream; Type: binary; Form: non-print; Structure: file.

Verbose: on; Bell: off; Prompting: on; Globbing: on.

Store unique: off; Receive unique: off.

Preserve modification times: on.

Case: off; CR stripping: on.

Ntrans: off.

Nmap: off.

Hash mark printing: off; Mark count: 1024; Progress bar: on.

Get transfer rate throttle: off; maximum: 0; increment 1024.

Put transfer rate throttle: off; maximum: 0; increment 1024.

Socket buffer sizes: send 131070, receive 262140.

Use of PORT cmds: on.

Use of EPSV/EPRT cmds for IPv4: on.

Command line editing: on.

Version: tnftp 20070806

Thanks for any insight on this...

share|improve this question

1 Answer 1

Assuming you have folder on FTP server full of files (not subfolders).
Create folder in your current dir that you want to rename:

mkdir test

get files with wget

cd test/ && wget ftp://user:pass@FTPserverIP/path/to/test/*

leave test folder cd .. and rename folder localy:

mv test/ testnew

then use wput to copy folder and files to ftp server:

wput testnew/* ftp://user:pass@FTPserverIP/path/to/test/parent/

This works on my Linux (Ubuntu) box, Mac should have wget but wput you might need to install.

Hope it helps, Mirko

share|improve this answer
    
Well that definitely got me a bit further thanks! Now, it's telling me there is no such file or directory which is not the case. I've entered the command ! dir and see the file I need to Duplicate. –  user235425 Jul 3 '13 at 12:29
    
does it have some spaces or special characters in name? you have to escape them with \<char> –  mirkobrankovic Jul 3 '13 at 12:30
    
sorry took so long to get back here. Caught up with a project. So there are no spaces or special characters going on here. Sounds like some freak occurrence that only I seem to be able to produce. This kind of thing happens to me all too often... –  user235425 Jul 8 '13 at 20:35
    
so, i've tried to make a copy of the public_html folder in cpanel and it comes back with "No such file or directory". I am in the root folder and checked the folder to see if public_html was in it using "ls" and it shows up. Why would it not find the file or directory? –  user235425 Jul 16 '13 at 10:43
    
I changed the answer after full understanding the problem, still I haven't used Mac a lot, but that should work. Let me know how it goes –  mirkobrankovic Jul 16 '13 at 12:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.