Thumela ifayela ku-FTP ngomyalo owodwa

Sesibonile ukuthi ungaxhuma kanjani kuseva ye-FTP futhi usebenze nayo (noma okuqukethwe kwayo) ngokusebenzisa i-terminal, okungukuthi, ngaphandle kokusebenzisa izinhlelo zokusebenza ezicacile.

Ngalesi sikhathi ngikulethela ukuhlanganisa noma okunye ... ake ngichaze.

Eminyakeni ethile edlule ngabashiya umbhalo we-bash osetshenziselwa ukwenza izipele (isindisa) idatha kusuka kuseva. Isikripthi sikopishe uchungechunge lwamafolda (njenge / njll /), imininingwane ethunyelwe kwamanye amazwe, njll ... futhi sayicindezela ngephasiwedi kufayela le-.RAR noma .7z (Okwamanje ngisebenzisa i-7z), ukuphela kwento iskripthi ebesintula ngayo ukukwazi ukulayisha lelo fayela elicindezelweyo kwenye iseva ye-FTP, ngale ndlela ukulondolozwa kusuka kuseva kuzokopishelwa kwenye indawo.

Kulezi zinsuku ngithathe iskripthi ukusilungiselela kancane, ngasithuthukisa futhi kusobala ukuthi isidingo sento yokugcina engikushilo kuwe savela, ngifaka ingobo yomlando ecindezelweyo ku-FTP yangaphandle.

/ Ungalayisha kanjani ku-FTP ngomyalo owodwa?

Engangikudinga kwakuwumyalo owodwa wokuxhuma ku-FTP ngegama lomsebenzisi nephasiwedi, futhi; layisha ifayela kufolda ethile.

Izicelo zeTheminali ezingivumela ukuthi ngixhumane ne-FTP, ngibeke umsebenzisi nephasiwedi futhi ngilayishe amafayela kuningi, kepha… lokho kungivumela ukuthi ngikwenze konke lokhu kulayini owodwa, nayo yonke imingcele esivele icacisiwe…. sawubona umbuzo.

Ngemuva kokubuyekeza ama-4 noma ama-5… ngicabange, huh !! ... kepha ikhona i-curl

Layisha ku-FTP ene-curl

Nge-curl ngingenza inani elingenamkhawulo lezinto, mhlawumbe ngingenza engikufunayo… futhi yilokho kuphela!

Nge --u ipharamitha ngingacacisa igama lomsebenzisi nephasiwedi, futhi ne - T ipharamitha ngingayitshela ukuthi ilayishe ifayela, futhi ekugcineni ngiyitshele ukuthi iyiphi i-FTP nokuthi iyiphi ifolda engifuna ukuyilayisha, ekugcineni ngivele beka indlela ephelele, cishe noma kanjena:

curl -u usuario:password -T archivo-backup.7z ftp://192.168.128.2/SERVER_BACKUPS/

Lokhu okwenzayo ukuxhuma ku-FTP 192.168.128.2, nomsebenzisi umsebenzisi ne-password iphasiwedi bese ulayisha kufolda I-SERVER_BACKUPS ifayela libiziwe isipele sefayela.7z

Futhi ngomumo!

Kulula? ...

Vele, lokhu kungaba wusizo kithina kanye nomyalo wedwa, noma kunjalo, indlela engcono yokuwusebenzisa ngombhalo onjenge ... engiwasho ngaphambili

Futhi kuthiwani ngalowo mbhalo oshiwo?

Ngenza ngcono iskripthi, ikakhulukazi ngifaka ezinye izicelo noma iziphakamiso ezivela kubasebenzisi.

  • Into yokuqala ebengifuna ukuyenza yilokhu engikuchazele kona nje, ngomyalo owodwa wokukwazi ukulayisha ifayela lokulondoloza ku-FTP.
  • Enye into umsebenzisi angincome ngayo ukuthumela i-imeyili lapho isipele sesikulungele, engingakusebenzisa sendmail noma a iskripthi sangaphandle, Ngingathanda ukusebenzisa i-sendmail. Imininingwane yokusebenzisa i-sendmail ukuthi ungasebenzisa i-akhawunti yakho ye-GMail (noma enye enye) ukuthumela i-imeyili, ngokubethela ... i-SSL nanoma yini.
  • Futhi, umsebenzisi uncoma ukuthi futhi, njengefomu elinamandla ngokwengeziwe lesaziso, umyalezo uthunyelwa yi-IM usebenzisa i-XMPP ye-GTalk noma i-Hotmail's (Live noma into enjalo, angazi nokuthi ibizwa ngani). Ngizozama ukukwenza nge-GTalk kuqala, ngoba nge-Hotmail kuzofanele ngikhumbule noma ngizisekele kwenye indawo ukuze ngakhe i-akhawunti ye-Hotmail, ngoba ngoshintsho oluningi iMicrosoft enalo, angazi ukuthi kunjani.
  • Okunye okwehlukile kokugcina kungaba ukusebenzisa izaziso noma imilayezo ethunyelwa i-Facebook noma i-Twitter. Nge-Twitter ongayisebenzisa I-Twidge ngenkathi usebenzisa i-Facebook ongayisebenzisa fbcmd. Zombili lezi zinhlelo zingivumela ukuthi ngihlanganyele nalawa manethiwekhi wokuxhumana nabantu avela ku-terminal.
  • Ngicabanga nokuhlola ubuqotho be-sql engiyithumela ngaphandle, kepha lokhu sekuvele kudinga isikhathi esithe xaxa :)

ftp iseva

Isiphetho!

Hhayi, akukho okunye engingangeza ... okwamanje, ngithatha imibhalo yami eminingi eyenziwe eBash ukuyilungiselela nokuyithuthukisa, ngiyethemba ukuthi ngeke kungithathe isikhathi eside ukuletha izindaba 😀

Phendula ngokucaphuna


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-8, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   i-barnarasta kusho

    Iphrojekthi enhle,
    Ngizoyilandela ngentshisekelo enkulu.
    - Noma yisiphi isaziso @ uma iseva iphansi noma ukulethwa kungenakwenziwa?

    Kujabulisa kakhulu ukufunda izindatshana ezivela kubathandi be-terminal / console.

    1 salu2

    1.    KZKG ^ Gaara kusho

      Ubumnandi bungobami 🙂

      Umbono omuhle, ukuqinisekisa ukuthi ngabe iseva ye-FTP iku-inthanethi futhi uma kungenjalo, ukuthumela i-imeyili ... ngizoyibheka ^ _ ^

  2.   UMoses Serrano kusho

    Bengishintshe iskripthi sakho sokulondoloza futhi ngaguqula iphrojekthi ekuvumela ukuthi ulayishe ifayili lokugcina kuDropboxhttps://github.com/andreafabrizi/Dropbox-Uploader) bese uthumela i-imeyili ekugcineni nge-sendmail.

  3.   isihlibhi kusho

    Gaara kufanele uzame ithuluzi elifanele lalokhu: lftp

    Iphinde isekele ukubukwa kwesibuko, ukuvumelanisa ama-repos kusuka ku-ftp kuyigugu.

    http://www.cyberciti.biz/faq/lftp-mirror-example/

  4.   Jorge kusho

    Kuyathakazelisa kakhulu, ubuhle balesi simiso, ungathola umphumela ofanayo ngezindlela eziningi; Ngikukhombisa indlela ebengilawula ngayo ukulayisha amafayela kuseva ye-ftp, i-rustic kepha isasebenza:

    {
    unanela iphasiwedi yomsebenzisi
    bin bin
    ukunanela ngokushesha
    echo cd / isiqondisi / kusuka / kuseva / ftp
    echo faka ifayela
    sondela
    enanela bye
    } | I-ftp -n iseva.ftp

    1.    KZKG ^ Gaara kusho

      OOOHHH kuyathakazelisa, bengingazi ukuthi yini engenziwa kanjalo 😀
      Siyabonga!

  5.   Sephiroth kusho

    Ezinye izindlela, ngokwesibonelo nge-wput:

    wput file_to_upload ftp: // USER: PASS@123.123.123.123: 21

    noma kulabo abathanda ukwenziwa lula kuskripthi besebenzisa i-telnet yakudala:

    ftp -n iseva_ip << EOF
    umsebenzisi akaziwa test@test.cu
    thumela iFILE.txt
    Phuma
    EOF

  6.   Javier kusho

    Sawubona, ngingumqali ku-Linux futhi angazi isayensi yamakhompiyutha - kuphela ezingeni lomsebenzisi - noma ukwenza uhlelo, noma yini efana naleyo, angazi lutho ngalokhu. Bengifunda le ndatshana futhi ngifunde ekugcineni kwesigaba sesibili igama elithi "indawo"; lelo gama lisetshenziswe kabi, ubuqonde ukuthi: indawo, indawo, indawo, indawo. Igama lendawo lisho okunye njengoba iRAE isho "http://dle.rae.es/?id=NXeOXqS".