Momwe mungasinthire ndikusintha mafayilo mu Linux

Onetsani zithunzi zosokoneza

M'nkhaniyi tikuphunzitsani compress ndi decompress mafayilo kuchokera kugawa kwanu komwe mumakonda kwa GNU / Linux, onse pogwiritsa ntchito malamulo ochokera ku console. Imeneyi ndi nkhani yokhudza oyamba kumene ndipo mmenemo sitikuphatikiza chithandizo cha ma tarball monga m'maphunziro ena, chifukwa ziziwonetsa momwe kuponderezana komanso kuponderezana kumachitika popanda kuzipaka ndi chida chabwino cha phula.

Ngakhale kukakamira komanso kuponderezana kumakhala kosavuta, ogwiritsa ntchito nthawi zambiri amafufuza pa intaneti momwe angachitire izi. Ndikuganiza kuti mosiyana ndi machitidwe ena monga MacOS ndi Windows pomwe zida zenizeni komanso zowoneka bwino zimagwiritsidwa ntchito, mu GNU / Linux zimakonda kuwonetsedwa mawonekedwe ambiri ndi zida zosiyanasiyana za aliyense wa iwo, ngakhale pali zida zosavuta pazithunzi ...

Pofuna kuponderezana komanso kuponderezana tidzagwiritsa ntchito maphukusi awiri ofunikira, popeza mwina ndi mafomu omwe amafunidwa kwambiri komanso omwe timakumana nawo pafupipafupi tikamagwira ntchito Machitidwe ofanana ndi Unix. Ndikunena za gzip ndi bzip2.

Kugwira ntchito ndi gzip

Para compress ndi gzip, mtundu womwe tikuti tichite ndi Lempel-Zi (LZ77), osati ZIP motero, chifukwa dzinalo lingayambitse chisokonezo. Dzinalo limachokera ku GNU ZIP, ndipo lidapangidwa m'malo mwa mtundu wa ZIP, koma silofanana. Ndikufuna kufotokozera momveka bwino ... Kupondereza fayilo:

gzip documento.txt

Izi zimapanga fayilo yotchulidwa yofanana ndi yoyambayo ndikuwonjezera .gz, mchitsanzo choyambirira chikanakhala document.txt.gz. M'malo mwake, chifukwa sintha dzinalo zotulutsidwa ndi mtundu wina:

gzip -c documento.txt > nuevo_nombre.gz

Para kuvula Zomwe zidakakamizidwa kale ndizosavuta, ngakhale titha kugwiritsa ntchito malamulo awiri osiyana ndi chimodzimodzi:

gzip -d documento.gz

gunzip documento.gz

Ndipo titenga fayilo kumasulidwa popanda kutambasuka kwa .gz.

Kugwira ntchito ndi bzip2

Koma bzip2, ikufanana ndi pulogalamu yam'mbuyomu, koma ndi mtundu wina wosanjikiza wotchedwa Burrows-Wheeler ndi Huffman coding. Kukula komwe tili nako pankhaniyi ndi .bz2. Kuti tilembere fayilo, tiyenera kungogwiritsa ntchito:

bzip2 documento.txt

Izi zimabweretsa chikalata chothinikizidwa.txt.bz2. Tikhozanso kusiyanitsa dzina lotulutsa ndi -c chisankho:

bzip2 -c documento.txt > nombre.bz2

Pofuna kuthetsa vutoli ndingagwiritse ntchito -d njira ya bunzip2 chida chomwe chili:

bzip2 -d documento.bz2

gunbzip2 documento.bz2

Kuti mudziwe zambiri mungagwiritse ntchito mwamuna lotsatiridwa ndi lamulo ...


Zomwe zili m'nkhaniyi zikutsatira mfundo zathu za malamulo okonzekera. Kuti mufotokoze cholakwika dinani Apa.

Ndemanga za 9, siyani anu

Siyani ndemanga yanu

Anu email sati lofalitsidwa.

*

*

  1. Wotsogolera pazosankhazi: Miguel Ángel Gatón
  2. Cholinga cha deta: Control SPAM, kasamalidwe ka ndemanga.
  3. Kukhazikitsa: Kuvomereza kwanu
  4. Kulumikizana kwa zomwe zafotokozedwazo: Zomwezo siziziwululidwa kwa anthu ena kupatula pakukakamizidwa mwalamulo.
  5. Zosunga: Zosungidwa ndi Occentus Networks (EU)
  6. Ufulu: Nthawi iliyonse mutha kuchepetsa, kuchira ndikuchotsa zidziwitso zanu.

  1.   Jaime Perea anati

    moni,

    Zikomo kwambiri chifukwa cha zolemba zanu, zimakhala zothandiza nthawi zonse.

    Mwina zingakhale zosangalatsa kutchulanso xz, popeza ikugwiritsidwanso ntchito pang'ono. Imakhala pakati pa bzip2 (pang'onopang'ono, koma imapanikiza kwambiri) ndi gzip (mwachangu, koma yosagwira ntchito). Izi pamitundu yayikulu, chifukwa monga chilichonse ... zimatengera. Ma tara omwe amaphatikizidwa ndi mafayilo a Debian / Ubuntu .deb nthawi zambiri amabwera mopanikizika mu mtundu wa xz.

    Njira yogwiritsira ntchito ikufanana ndi malamulo ena a sos.

  2.   Ernesto anati

    Moni, ndikufuna kupempha kuti izi zichitike koma ndi tar.gz popeza ndi yomwe imagwiritsidwa ntchito kwambiri (mwa lingaliro langa kutengera chilichonse chomwe ndimatsitsa pa intaneti)

  3.   Alireza anati

    Kodi akunena chiyani za mitundu yotchuka koma yamagulu angapo ngati .7z? Ayeneranso kuwapatsa mayina

  4.   omeza anati

    Hi Jose, zomwe zimachitika ndi mafayilo a tar.gz ndikuti mumagwiritsa ntchito lamulo lina lomwe ndi tar ndipo pamenepa lamulo la tar lokha silikakamiza (kapena decompress) koma limagwiritsidwa ntchito kupangira (kapena kusagwirizana) mafayilo m'modzi, izi zimaphatikizana ndi gzip ndi bzip2 command yomwe mutha kupondereza ndikusintha.

    1.    Gonzalo anati

      Mukunena zowona, Ernesto, chifukwa cha mtundu waulere wa 7z womwe umadzipangira Windows, m'malo mwa zip ndi rar, ndipo satchula?

  5.   a anati

    google.com

  6.   usr anati

    M'zaka za zana la 21 ndikugwiritsabe ntchito malamulo kupondereza fayilo yosavuta? Izi ndizachisoni

    1.    usr/gawo anati

      Zanena bwino, sindikuwona kufunika kogwiritsa ntchito lamulo kukakamiza fayilo yosavuta

  7.   Katrin anati

    Mwinanso zingakhale zosangalatsa