3

FTP from Mac Terminal

 2 years ago
source link: https://www.programmerinterview.com/assortment/ftp-from-mac-terminal/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

FTP from the Mac Terminal – how do you fix the “Is a directory” error?

 

We were playing around with the Terminal on the Mac to FTP some things over to an FTP site.

After we had FTP’d to our site, we had tried running this command:

put  /Users/vg/picture.jpg  /programmerinterview/

But, then we got this error:

Error: /programmerinterview: Is a directory.

We then realized that the reason we got this error is because we had to specify the filename that we wanted the file to have on the server that we were FTP-ing to. We were thinking that it would be smart enough to know that we wanted “picture.jpg” to have the same name on the FTP site under the /programmerinterview directory, but we were wrong.

So, we ran this command:

put /Users/vg/picture.jpg  /programmerinterview/picture.jpg

And it ran perfectly! Just another tip in case you ever encounter this problem!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK