Upload File su FTP col Comand WPUT

28 Giugno 2009 di Daniele Frulla


Avete mai provato ad inserire tramite l’FTP (File Transfer Protocolo) una cartella o diversi files?

Solitamente esistono software grafici come:

FileZillaFTP

SmartFTP

e tanti altri ancora.

Tuttavia, i tools da linea di comando sono molto più veloci e solitamente non crashano come possono fare quelli grafici.

Quindi, se avete qualche problema con i tools grafici ftp, continuate a leggere.

Tempo fa avevo parlato di come utilizzare WGET per fare un backup da linea di comando.

Esiste una utility che si chiama WPUT reperibile sia per windows che per linux.

Con sistema operativo Linux basta digitare da terminale

sudo apt-get install wput

e vedrete installata questa semplicissima utility.

Per il sistema operativo Windows si può scaricare il wput in sourceforge e piazzarlo in C:/Windows/system32 che consentirà di poterlo eseguire da qualsiasi punto dell’hard disk in cui siete.

Come Funziona

Il funzonamento è semplice:

  1. Andate sulla cartella che volte uploadare.
  2. Scrivete  wput -u [cartella locale o file]  ftp://[utente_ftp]:[password_ftp]@[indirizzo_server_ftp]/[percorso cartella ftp]

Basterà aspettare che l’upload sia terminato, per avere la propria cartella a disposizione sul server FTP.

Potete vedere tutte le opzioni di wput tramite:

wput –help

 Usage: wput [options] [file]… [url]…
url        ftp://[username[:password]@]hostname[:port][/[path/][file]]

Startup:
-V, –version         Display the version of wput and exit.
-h, –help            Print this help-screen
-b, –background      go to background after startup

Logging and input file:
-o,  –output-file=FILE      log messages to FILE
-a,  –append-output=FILE    append log messages to FILE
-q,  –quiet                 quiet (no output)
-v,  –verbose               be verbose
-d,  –debug                 debug output
-nv, –less-verbose          be less verbose
-i,  –input-file=FILE       read the URLs from FILE
-s,  –sort                  sorts all input URLs by server-ip and path
–basename=PATH         snip PATH off each file when appendig to an URL
-I,  –input-pipe=COMMAND    take the output of COMMAND as data-source
-R,  –remove-source-files   unlink files upon successful upload

Upload:
–bind-address=ADDR     bind to ADDR (hostname or IP) on local host
-t,  –tries=NUMBER          set retry count to NUMBER (-1 means infinite)
-nc, –dont-continue         do not resume partially-uploaded files
-u,  –reupload              do not skip already completed files
–skip-larger           do not upload files if remote size is larger
–skip-existing         do not upload files that exist remotely
-N,  –timestamping          don’t re-upload files unless newer than remote
-T,  –timeout=10th-SECONDS  set various timeouts to 10th-SECONDS
-w,  –wait=10th-SECONDS     wait 10th-SECONDS between uploads. (default:0)
–random-wait           wait from 0…2*WAIT secs between uploads.
–waitretry=SECONDS     wait SECONDS between retries of an upload
-l,  –limit-rate=RATE       limit upload rate to RATE
-nd, –no-directories        do not create any directories
-Y,  –proxy=http/socks/off  set proxy type or turn off
–proxy-user=NAME       set the proxy-username to NAME
–proxy-pass=PASS       set the proxy-password to PASS

FTP-Options:
-p,  –port-mode             no-passive, turn on port mode ftp (def. pasv)
-A,  –ascii                 force ASCII  mode-transfer
-B,  –binary                force BINARY mode-transfer
–force-tls             force the useage of TLS

See wput(1) for more detailed descriptions of the options.
Report bugs and suggestions via SourceForge at
http://sourceforge.net/tracker/?group_id=141519

Fonte: www.newstechnology.eu


Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *


Copyright di Caterina Mezzapelle Part. I.V.A. 02413940814 - R.E.A. 191812