Tumira faira kuFTP nemirairo imwechete

Isu tatoona maitiro ekubatanidza kune FTP server uye nekushanda nayo (kana zvirimo) kuburikidza neiyo terminal, ndokuti, pasina kushandisa graphic application.

Ino nguva ndinokuunzira yekuwedzera kana yekuwedzera ... rega nditsanangure.

Mamwe makore apfuura ndakavasiya a bash script inoshandiswa kugadzira mabhakuki (inosevha) yedhata kubva kuseva. Iyo script yakateedzera akateedzana emafaira (senge / etc /), akaendesa kunze dhatabhesi, nezvimwe ... uye akaimanikidza ne password muRAR kana .7z faira (ini parizvino ndinoshandisa 7z), chinhu chete icho script chakashaikwa kugona kuisa. ipapo iyo yakamanikidzwa faira kune imwe FTP server, nenzira iyi iyo yekuchengetedza kubva kuseva yaizoteedzerwa kune imwe nzvimbo.

Mazuva ano ndakatora script zvakare kuti ndiigadzirise zvishoma, ndichivandudza uye zviripachena kudiwa kweyekupedzisira iyo yandataura kwauri yakauya pachena, ndichiisa yakatsindirwa dura kune yekunze FTP.

Nzira yekuisa sei kune FTP nemirairo imwechete?

Chandaida kwaive kuburikidza nemurairo mumwechete kuti ubatanidze kune FTP ine zita rekushandisa uye password, uye zvakanaka; upload iyo faira kune yakasarudzika folda.

Terminal application izvo zvinondibvumidza kuti ndibatanidze kune FTP, isa mushandisi & password uye kurodha mafaera pane mijenya, asi… izvo zvinonditendera kuti ndiite izvi zvese mumutsara mumwe, nezvose zviyero zvakatodudzwa…. hesi pane mubvunzo.

Mushure mekuongorora 4 kana 5… ndakafunga, huh !! ... asi iripo curl they

Isa kune imwe FTP ine curl

Ne curl ini ndinogona kuita isingaperi nhamba yezvinhu, pamwe ini ndinogona kuita zvandiri kuda ... uye ndizvozvo!

Iine -u paramende ndinogona kudoma mushandisi uye password, zvakare ne -T paramende ini ndinogona kuiudza kuti iise faira, uye pakupedzisira kuudza iyo FTP uye kuti ndeipi forodha yandinoda kuiisa, pakupedzisira ini ndinongoisa nzira izere, zvakanyanya kana zvishoma seizvi :

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

Izvi zvinoita kubatana neFTP 192.168.128.2, pamwe nemushandisi mushandisi uye password pasiwedhi uye tumira kune folda SERVER_BACKUPS iyo faira inonzi faira-backup.7z

Uye gadzirira!

Zviri nyore handizvo? ...

Ehezve, izvi zvinogona kubatsira kwatiri zvakare iwo murairo wega, zvisinei, nzira yakanakisa yekuishandisa iri nechinyorwa chakadai ... icho chandakambotaura

Uye zvakadii nezve iyo script iyo inotaurwa?

Ndiri kugadziridza script, kunyanya kusanganisa zvimwe zvikumbiro kana mazano kubva kuvashandisi.

  • Chinhu chekutanga chandaida kuita chaive ichi chandichangotsanangudza kwauri, nemurairo mumwe chete kuti ndikwanise kurodha faira rekuchengetedza kuFTP.
  • Chimwe chinhu icho mushandisi chaakandikurudzira ndechekutumira email kana iyo backup yagadzirira, yezve izvo zvandinogona kushandisa sendmail kana a kunze script, Ini ndinenge ndoda kushandisa sendmail. Tsananguro yekushandisa sendmail ndeyekuti iwe unogona kushandisa yako GMail account (kana chero imwe) kutumira iyo email, ine encryption ... SSL uye chero.
  • Zvakare, mushandisi akakurudzira kuti zvakare, seimwe simba rekuzivisa, meseji inotumirwa neIM uchishandisa GTalk's XMPP kana Hotmail's (Rarama kana chimwe chinhu chakadai, ini handitozive icho chinonzi). Ini ndichaedza kuzviita neGTalk kutanga, nekuti Hotmail ndaizofanira kurangarira kana kuzvitsigira kumwe kunogadzira Hotmail account, nekuti nekuchinja kwakawanda-shanduko iyo Microsoft inayo, ndisingazive kuti zvakaita sei.
  • Imwe misiyano yekupedzisira ndeye kushandisa notices kana mameseji anotumirwa neFacebook kana Twitter. Zve Twitter iwe unogona kushandisa Twidge nepo paFacebook iwe yaunogona kushandisa fbcmd. Maapplication ese ari maviri anondibvumidza kudyidzana neaya masocial network kubva kuchiteshi.
  • Ndiri kufunga zvakare nezve kutendeseka kweiyo sql yandinotumira kunze, asi izvi zvinotoda nguva yakati rebei :)

ftp server

Magumo!

Zvakanaka, hapana chimwezve chekuwedzera ... kwechinguvana, ndiri kutora zvinyorwa zvangu zvinoverengeka zvakaitwa muBhash kuti ndigadzirise uye ndivandudze, ndinovimba hazvingatore nguva yakareba kuunza nhau news

Reply with quote


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Makomendi gumi, siya zvako

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa. Raida minda anozivikanwa ne *

*

*

  1. Inotarisira iyo data: Miguel Ángel Gatón
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako

  1.   barnarasta akadaro

    Basa rakakura,
    Ini ndichaitevera nechido chakakura.
    - Chero chiziviso @ kana sevha iri pasi kana kuendesa kwaisakwanisa kuitwa?

    Zvakanakisa kunakidza kuverenga zvinyorwa kubva kune vanogumira / vanyaradzi vanoda.

    1mhoro2

    1.    KZKG ^ Gaara akadaro

      Kunakirwa kwacho ndokwangu 🙂

      Pfungwa yakanaka, kuongorora kana FTP server iri online uye kana zvisiri, kutumira email ... ini ndinozvifunga ... _ ^

  2.   Moses Serrano akadaro

    Ini ndaive ndashandura yako yekuchengetedza script uye ndikachinjisa chirongwa chinokutendera iwe kurodha yekupedzisira faira kuDropbox (https://github.com/andreafabrizi/Dropbox-Uploader) uye tumira email kumagumo ne sendmail.

  3.   dhunter akadaro

    Gaara unofanirwa kuedza chishandiso chakakodzera cheichi: lftp

    Iyo kunyange inotsigira mirroring, kuti sync repos kubva ftp inokosha.

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

  4.   Jorge akadaro

    Inonakidza kwazvo, ndiko kunaka kwesisitimu ino, unogona kuwana mhedzisiro yakafanana nenzira dzakawanda; Ini ndinokuratidza nzira yandakanga ndichikwanisa kuisa mafaera kune ftp server, iri rustic asi ichiri kushanda:

    {
    echo mushandisi mushandisi password
    echo bin
    echo kukurumidza
    echo cd / dhairekitori / kubva / server / ftp
    echo isa faira
    edza pedyo
    echo bye
    } | ftp -n server.ftp

    1.    KZKG ^ Gaara akadaro

      OOOHHH inonakidza, ini ndaisaziva kuti chii chingaitwe saizvozvo 😀
      Gracias !!

  5.   Sephiroth akadaro

    Dzimwe nzira, semuenzaniso ne wput:

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

    kana kune avo vanofarira kupfava mune script vachishandisa yekare telnet:

    ftp -n server_ip << EOF
    mushandisi asingazivikanwe test@test.cu
    tumira FILE.txt
    mbudo
    EOF

  6.   Javier akadaro

    Mhoroi, ini ndiri wekutanga muLinux uye ini handizive sainzi yekombuta - chete padanho revashandisi - kana chirongwa, kana chero chinhu chakadai, ini handizive nezve izvi. Ini ndanga ndichiverenga ichi chinyorwa uye ndakaverenga kumagumo kwendima yechipiri izwi rekuti "nzvimbo"; iro izwi rinoshandiswa zvisirizvo, wanga uchireva: nzvimbo, nzvimbo, nzvimbo, nzvimbo. Izwi rekuti nzvimbo rinoreva chimwe chinhu sekutaura kweRAE "http://dle.rae.es/?id=NXeOXqS".