Uploading Multiple Files in Terminal

hinotoxin

Registered
I am using the command "mput" in terminal because I want to upload a whole folder.
I typed mput, pressed return, then dragged the folder "gb" into the terminal and pressed return, then this line appeared:

mput /Users/elizabethmclernon/Sites/gb/ [anpqy?]?

And I have no idea what to do next. If anyone could help it would be very appreciated. Thanks.
 
Don't drag the folder itself -- highlight all the files inside the folder, then drag the bunch of them to the terminal window. All the pathnames should fill in, which is the correct syntax for mput...

It should be:

Code:
mput <file1> <file2> <file3> ... <fileN>
 
According to the ftp man page: "Note: mget and mput are not meant to transfer entire directory subtrees of files. That can be done by transferring a tar(1) archive of the subtree (in binary mode)."

On your local machine you should be able to use tar:

tar -cf tared.file.name.tar <input files or wildcard>

then enter the ftp environment and upload the tar file using the put command in binary mode.

then within the ftp enviroment use the ! command to untar the files on the remote machine

ftp> !tar -xf tared.file.name.tar
 
Back
Top