Aika fayil zuwa FTP tare da umarni ɗaya

Mun riga mun ga yadda za a haɗa zuwa sabar FTP da aiki tare da shi (ko tare da abin da ke ciki) ta hanyar tashar, wato, ba tare da amfani da aikace-aikacen zane ba.

Wannan karon na kawo muku kari ko kari ... bari nayi bayani.

Wasu shekarun da suka gabata na bar su rubutun bash wanda ake amfani dashi don yin abubuwan adanawa (adana) bayanai daga sabar. Rubutun ya kwafe jerin manyan fayiloli (kamar / sauransu /), fitar da rumbunan adana bayanai, da sauransu ... kuma ta matse shi da kalmar wucewa cikin fayil .RAR ko .7z (A halin yanzu ina amfani da 7z), abin da kawai rubutun ya rasa shi ne kasancewar ana iya loda fayil dinda aka matse shi zuwa wasu sabar FTP, ta wannan hanyar ne za'a kwafa ceton daga sabar zuwa wani wuri.

A 'yan kwanakin nan na ɗauki rubutun don inganta shi kaɗan, inganta shi kuma a bayyane yake buƙatar abu na ƙarshe da na ambata muku ya bayyana, tare da loda matattarar bayanan zuwa FTP na waje.

Yadda ake lodawa zuwa FTP tare da umarni ɗaya?

Abin da nake buƙata shine ta hanyar umarni ɗaya don haɗawa zuwa FTP tare da sunan mai amfani da kalmar wucewa, kuma da kyau; loda fayil din zuwa takamaiman fayil.

Aikace-aikacen Terminal da ke ba ni damar haɗi zuwa FTP, sanya mai amfani & kalmar wucewa da loda fayiloli akwai kuri'a, amma… hakan yana ba ni damar yin wannan duka a layi ɗaya, tare da duk sigogin da aka riga aka bayyana specified. akwai tambaya.

Bayan nazarin 4 ko 5… Na yi tunani, huh !! ... amma akwai shi Curl

Loda zuwa FTP tare da curl

Tare da curl zan iya yin abubuwa da yawa marasa iyaka, watakila zan iya yin abin da nakeso… kuma hakane!

Tare da -u siga zan iya tantance mai amfani da kalmar wucewa, haka ma tare da -T siga zan iya gaya masa don loda fayil, kuma a ƙarshe in gaya masa wane FTP da wane fayil ɗin da nake son loda shi, a ƙarshe kawai sanya cikakkiyar hanya, fiye ko likeasa kamar haka:

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

Abin da wannan yake yi ya haɗa da FTP 192.168.128.2, tare da mai amfani mai amfani da kalmar wucewa password kuma loda zuwa babban fayil SERVER_BACKUPS fayil mai suna fayil-madadin.7z

Kuma a shirye!

Dama mai sauki? ...

Tabbas, wannan na iya zama da amfani a gare mu kuma umarnin kawai, duk da haka, hanya mafi kyau don amfani da ita shine tare da rubutun kamar ... wanda na ambata a baya

Kuma yaya game da wannan rubutun da aka ambata?

Ina yin gyara ga rubutun, musamman hada wasu buƙatu ko shawarwari daga masu amfani.

  • Abu na farko da na so nayi shine daidai wannan da nayi muku bayani, tare da umarni guda don samun damar loda fayil ɗin ajiyar zuwa FTP.
  • Sauran abin da mai amfani ya ba ni shawara shi ne aika imel lokacin da aka shirya madadin, don wannan zan iya amfani da shi aika sako ko rubutun waje, Zan fi dacewa amfani da wasiku. Bayani dalla-dalla na amfani da wasiku shine cewa zaka iya amfani da asusunka na GMail (ko wani) don aika imel ɗin, tare da ɓoyewa ... SSL da komai.
  • Hakanan, mai amfani ya ba da shawarar cewa, kuma a matsayin salo mai saurin fadakarwa, IM za ta turo sako ta amfani da GTalk's XMPP ko Hotmail's (Live ko wani abu makamancin haka, ban ma san me ake kira ba). Zan yi ƙoƙari in yi shi da GTalk da farko, saboda don Hotmail dole ne in tuna ko tallafawa kaina a wani wuri don ƙirƙirar asusun Hotmail, saboda tare da sauye-sauye da yawa da Microsoft ke da su, ba ku san yadda yake ba.
  • Wani bambancin na karshen shine amfani da sanarwa ko saƙonnin da Facebook ko Twitter suka aiko. Don Twitter zaku iya amfani da shi Twidge yayin da don Facebook zaka iya amfani dashi fbcmd. Duk waɗannan aikace-aikacen suna ba ni damar yin ma'amala da waɗannan hanyoyin sadarwar zamantakewar daga tashar.
  • Ina kuma tunanin duba ingancin sql din da nake fitarwa, amma wannan tuni yana bukatar lokaci kadan :)

sabar ftp

Karshe!

Da kyau, babu wani abu da za a ƙara ... a halin yanzu, ina karɓar rubutun da yawa da aka yi a Bash don haɓakawa da haɓaka su, Ina fata ba zai ɗauki dogon lokaci ba don kawo labarai 😀

gaisuwa


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

8 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   barnarasta m

    Babban aiki,
    Zan bi shi da babbar sha'awa.
    - Duk wani sanarwa @ idan sabar tayi kasa ko aka kasa isar da ita?

    Abin farin ciki sosai don karanta labarai daga masoya masu ƙarancin wuta / wasan bidiyo.

    1 salu2

    1.    KZKG ^ Gaara m

      Jin daɗi nawa ne 🙂

      Kyakkyawan ra'ayi, don tabbatarwa idan sabar FTP tana kan layi idan kuma ba haka ba, don aika imel ... Zanyi la'akari dashi ^ _ ^

  2.   Musa Serrano m

    Na daidaita rubutun ku kuma na daidaita aikin da zai baku damar loda fayil ɗin ƙarshe zuwa Dropbox (https://github.com/andreafabrizi/Dropbox-Uploader) kuma aika imel a ƙarshen ta hanyar aika wasiƙa.

  3.   nisanta m

    Gaara dole ne ku gwada kayan aikin da ya dace don wannan: lftp

    Hakanan yana goyan bayan mirroring, don daidaita aiki daga ftp bashi da tsada.

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

  4.   Jorge m

    Mai matukar ban sha'awa, shine kyawun wannan tsarin, zaku iya samun sakamako iri ɗaya ta hanyoyi da yawa; Ina nuna muku hanyar da nake sarrafawa don loda fayiloli zuwa sabar ftp, yana da ɗan tsattsauran ra'ayi amma har yanzu yana aiki:

    {
    amsa kuwwa mai amfani da kalmar sirri
    amsa kuwwa bin
    amsa kuwwa da sauri
    amsa kuwwa cd / directory / daga / uwar garke / ftp
    amsa kuwwa sanya fayil
    amsa kuwwa kusa
    amsa kuwwa wallahi
    } | ftp -n uwar garke.ftp

    1.    KZKG ^ Gaara m

      OOOHHH mai ban sha'awa, Ban san me za ayi ba haka this
      Gracias !!

  5.   Sephiroth m

    Sauran hanyoyi, misali tare da wput:

    wput file_to_upload ftp: // MAI AMFANI: PASS@123.123.123.123: 21

    ko don waɗanda suka fi son sauƙi a cikin rubutun ta amfani da tsohuwar telnet:

    ftp -n uwar garken_ip << EOF
    mai amfani ba a sani ba test@test.cu
    aika FILE.txt
    fita
    EOF

  6.   Javier m

    Barka dai, Ni dan farawa ne a cikin Linux kuma ban san ilimin kwamfuta ba - kawai a matakin mai amfani - ko shirye-shirye, ko wani abu makamancin haka, kusan ni jahilai ne game da wannan. Ina karanta wannan labarin ne kuma na karanta a ƙarshen sakin layi na biyu kalmar "wuri"; ba a amfani da wannan kalmar, kuna nufin: wuri, wuri, wuri, wuri. Kalmar wuri tana nufin wani abu kamar yadda RAE ke faɗi "http://dle.rae.es/?id=NXeOXqS".

bool (gaskiya)