cURL - SyntaxProblem

Du hast Probleme mit Deinem eMail-Programm, Webbrowser oder Textprogramm? Dein Lieblingsprogramm streikt?
Antworten
Benutzeravatar
DEBIANUNDANDREAS
Beiträge: 1304
Registriert: 01.06.2013 10:37:46

cURL - SyntaxProblem

Beitrag von DEBIANUNDANDREAS » 27.08.2016 20:35:38

Hallo ich habe kurzfristig Debian.
Ich möchte per Konsolenbefehl cURL eine html-datei (diese befindet sich auf der HDD) auf einen FTPserver, übertragen.
Ich komme mit der Syntax nicht zurecht.
Wer kann mir helfen cURL rackern zu lassen.

schwedenmann
Beiträge: 5525
Registriert: 30.12.2004 15:31:07
Wohnort: Wegberg

Re: cURL - SyntaxProblem

Beitrag von schwedenmann » 27.08.2016 20:54:59

Hallo


siehe hier
http://thomas-falkner.de/2011/01/25/cur ... -erklaert/

letztes Beispiel

mfg
schwedenmann

Benutzeravatar
DEBIANUNDANDREAS
Beiträge: 1304
Registriert: 01.06.2013 10:37:46

Re: cURL - SyntaxProblem

Beitrag von DEBIANUNDANDREAS » 27.08.2016 21:00:02

Danke mein lieber schwedenmann für dein posting, ich habs jetzt begriffen, danke. Gelöst.

rendegast
Beiträge: 15041
Registriert: 27.02.2006 16:50:33
Lizenz eigener Beiträge: MIT Lizenz

Re: cURL - SyntaxProblem

Beitrag von rendegast » 27.08.2016 22:54:38

In der manpage ist es eigentlich erklärt, inklusive Beispiel
(zumindest auf englisch)

Code: Alles auswählen

      -T, --upload-file <file>
              This transfers the specified local file to the remote URL. If there is no
              file part in the specified URL, Curl will append  the  local  file  name.
              NOTE that you must use a trailing / on the last directory to really prove
              to Curl that there is no file name or curl  will  think  that  your  last
              directory  name  is  the  remote  file name to use. That will most likely
              cause the upload operation to fail. If this is used on an HTTP(S) server,
              the PUT command will be used.

              Use  the  file  name  "-" (a single dash) to use stdin instead of a given
              file.  Alternately, the file name "." (a single period) may be  specified
              instead  of "-" to use stdin in non-blocking mode to allow reading server
              output while stdin is being uploaded.

              You can specify one -T for each URL on the command line. Each  -T  +  URL
              pair specifies what to upload and to where. curl also supports "globbing"
              of the -T argument, meaning that you can upload multiple files to a  sin‐
              gle  URL  by using the same URL globbing style supported in the URL, like
              this:

              curl -T "{file1,file2}" http://www.uploadtothissite.com

              or even

              curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")

Benutzeravatar
DEBIANUNDANDREAS
Beiträge: 1304
Registriert: 01.06.2013 10:37:46

Limacity der Webhoster

Beitrag von DEBIANUNDANDREAS » 28.08.2016 16:41:06

Hallo, ich versuche auf meinem Ubuntuserver (eweitesgehend identisch mit Debian) per Script >>>
curl -u x-belibrigserver:Passwort -T /home/andy/default-index.html htpps://x-beliebigr.lima-city.de
eine datei (default-index.html) auf den Webspace zu übertragen. Das funktioniert nicht, die Übertragung funktioniert nur kommt Sie nicht an.
Was mache ich Falsch? Und wie macht man es mit curl richtig?

Benutzeravatar
towo
Beiträge: 4403
Registriert: 27.02.2007 19:49:44
Lizenz eigener Beiträge: GNU Free Documentation License

Re: Limacity der Webhoster

Beitrag von towo » 28.08.2016 16:57:40

auf meinem Ubuntuserver (eweitesgehend identisch mit Debian)
Nein!
per Script
Das ist kein Script sondern ein Befehl!
Was mache ich Falsch?
Du bistg einfach nur zu faul die Dokumentation zu lesen.

Benutzeravatar
Saxman
Beiträge: 4215
Registriert: 02.05.2005 21:53:52
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: localhost

Re: cURL - SyntaxProblem

Beitrag von Saxman » 28.08.2016 16:59:08

Ein Thread zu dem Thema reicht doch wohl.
"Unix is simple. It just takes a genius to understand its simplicity." - Dennis Ritchie

Debian GNU/Linux Anwenderhandbuch | df.de Verhaltensregeln | Anleitungen zum Review und zum Verfassen von Wiki Artikeln.

rendegast
Beiträge: 15041
Registriert: 27.02.2006 16:50:33
Lizenz eigener Beiträge: MIT Lizenz

Re: cURL - SyntaxProblem

Beitrag von rendegast » 29.08.2016 01:24:35

DEBIANUNDANDREAS hat geschrieben: ... htpps://x-beliebigr.lima-city.de
"htpps:" nur im Post ein Typo?
... -u x-belibrigserver:Passwort ... htpps://x-beliebigr.lima-city.de
Der Benutzer x-belibrigserver darf ins / des x-beliebigr.lima-city.de schreiben?

curl macht normalerweise Ausgaben.
Log des httpd?
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")

Antworten