Sponsored Content
Top Forums Shell Programming and Scripting Uploading a file in ftp by culr? Post 302441605 by pludi on Sunday 1st of August 2010 02:44:02 PM
Old 08-01-2010
It's pretty simple, actually. The basic structure is
Code:
curl <option> <URI>

with the URI being a combination of protocol, user, password, server, port, and path. The option you're looking for is -T. So the command line would be
Code:
curl -T /local/path/file ftp://<user>:<pass>@<server>/remote/path

or
Code:
curl -u <user> -T /local/path/file ftp://<server>/remote/path

if you want curl to ask for the password.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Uploading a flat file into the database.

I want to upload a text file into the database. what is the command for that? Thanks in Advance. (1 Reply)
Discussion started by: Balkrishna
1 Replies

2. Shell Programming and Scripting

Simple script uploading *.dem files to an ftp

Hello.. i want to create a simple script that's upload all the *.dem files from one directory to ftp and then delete them. Any help? (3 Replies)
Discussion started by: TuXaKoS
3 Replies

3. UNIX for Dummies Questions & Answers

Uploading a Directory via FTP in the Command Line

Hello, Is there a way to upload a directory via ftp in the command line in a single line? I'd be looking for something like this: ftp -username me -password 12345 /Users/me/mywebsitefolder /publichtml/ But I can't figure out the proper syntax. Thank you for any help. -Grey (1 Reply)
Discussion started by: wellington_grey
1 Replies

4. Solaris

Issue With File Permissions while uploading

one of the business users is ftping files into unix box using user name ftp_user, where as i am using infa_user to login into same unix box. When i am trying to access those or copy over those files from upload directory it says permission denied. Though i know the password of ftp_user to... (4 Replies)
Discussion started by: Ariean
4 Replies

5. Shell Programming and Scripting

Issue in uploading file using sftp

Hi I'm using this script to upload a file from local system to sftp server. But in the log file i'm getting an error "Error during upload" Can you please help me out ... ### CONFIGURATION LOCAL_DIR=/abc/out FILE_MASK="File*.txt" LOG_DIR=/abc/error/File_`date "+%Y%m%d%H%M%S"`.LOG... (3 Replies)
Discussion started by: Jaychandra
3 Replies

6. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

7. Shell Programming and Scripting

Shell: uploading file from UNIX server to sharepoint server

Is it possible to upload a file from unix server to sharepoint server through shell or perl scripting. I have the sharepoint link where it needs to be uploaded. Could you please share your views on this ? (0 Replies)
Discussion started by: scriptscript
0 Replies

8. Shell Programming and Scripting

Perl , uploading empty file.

Hi The below script used to work fine. Suddenly it's uploading empty file. I am very new to perl. Please help me to find out the problem. #!/usr/bin/perl #script: upload.pl use CGI qw/:standard/; print header, start_html('File upload'); print_form(); print_results() if... (2 Replies)
Discussion started by: Anupam_Halder
2 Replies

9. UNIX for Advanced & Expert Users

SFTP Resticting Only Uploading Of A File

I have setup our SFTP server: SFTP Setup: /etc/ssh/sshd_config: Subsystem sftp internal-sftp Match Group sftpusers PasswordAuthentication yes ChrootDirectory /srv/sftponly AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp Adding the... (5 Replies)
Discussion started by: metallica1973
5 Replies

10. Shell Programming and Scripting

[Solved] Simple Shellscript for uploading files to a specific folder on a ftp-server?

hi! Iam using my D-link DNS-320 (NAS) with fun_plug installed (a unix client) I am currently using cron to run a shellscript running a java-application that creates a couple of txt files. These files needs to be uploaded to a specific folder on my webhosts ftp server-account. I need a... (16 Replies)
Discussion started by: Nigge
16 Replies
SIMPLEFTP(1)						      General Commands Manual						      SIMPLEFTP(1)

NAME
simpleftp - rudimentary ftp client SYNOPSIS
simpleftp ftp://... [ ... ] DESCRIPTION
simpleftp is a perl script that provides basic support for fetching files with FTP in a batch oriented fashion. It takes one or more ftp URLS on the command line. The file(s) will be retrieved from the remote server and placed in the current directory with the same basename as on the remote; i.e., ftp://ftp.isc.org/pub/usenet/CONFIG/active.gz is stored as active.gz in the current directory. BUGS
simpleftp is an extremely poor substitute for more complete programs like the freely available wget or ncftp utilities. It was written only to provide elementary support in INN for non-interactive fetching of the files in ftp://ftp.isc.org/pub/usenet/CONFIG/ without requir- ing administrators to install yet another package. Its shortcomings as a general purpose program are too numerous to mention, but one that stands out is that simpleftp does not understand the complete syntax of URLs, only the hostname and pathname parts -- it will not under- stand username, password, port or parameter strings. HISTORY
Tossed off by David C Lawrence <tale@isc.org> for InterNetNews. SEE ALSO
actsync(8). SIMPLEFTP(1)
All times are GMT -4. The time now is 08:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy