Chinja iwo mahombekombe kuita mashoma emafaira mazita

Edza kutsvaga (Linux raira)

Pazviitiko zvakawanda zviri nani kuva ne yepazasi faira uye dhairekitori mazita. Kuenda rimwe nerimwe kutumidza zita zvakare ibasa rakaoma. Kunyanya kana paine mazana kana zviuru zvemafaira, iro basa rinowedzera kuomarara uye kunonetsa kupfuura neruoko. Asi izvi hazvireve kuti hazvigoneke kana kuti hapana nzira dzekuzviita nenzira inokurumidza uye inogadziriswa.

Asi kunze kweiyo yakachena aesthetics kana zvinofarirwa nemushandisi wega wega, dzimwe nguva ndezve nyaya dzehunyanzvi, sezvo vamwe maapplication haakwanise kushanda nemamwe mazita nemavara makuru uye dzinoda kushandurwa. Paunosangana nechimwe cheizvi maapplication, pamwe wanga uri kuunganidza mafaera ane mazita emarudzi ese kwenguva yakareba, uye kudzoka kunova kwakaomarara. Asi usazvidya moyo, ine mhinduro yakapusa sezvandinokuratidza mune ino dzidziso ...

Chinja iwo mahombekombe kuita mashoma

Raira kuti uchinje kubva kumusoro kusvika kumavara madiki

Chinhu chekutanga iwe chaunofanira kuziva ndechekuti iwo unotevera kuraira unoshandura ese makuru mavara kuita mashoma, kusanganisira kana paine zvinyorwa zvidiki mukati mechinyorwa icho. Saka kana iwe usiri kuda kuti ese ave madiki, ingo zviite mune yakasarudzika dhairekitori kana ichashandura zvese iwe. Izvi zvinoita kunge zvakakosha kwandiri kuitira kuti gare gare iwe usazove nematambudziko uye mazita awanga usingade kushandurwa kuve mavara madiki anotendeuka.

Kune rimwe divi, iwe unoda ita chirongwa chekutumidza zita chaiswa. Kana iwe usina iyo yakaiswa, shandisa yako distro's package maneja kuiisa nyore. Nekudaro, kazhinji iwe unofanirwa kunge uine iyo yakaiswa, saka hazvizove zvakakosha kuiisa mune ese kesi. Ichi chishandiso chinokushandira iwe kuti ukwanise kushandura akati wandei mazita panguva imwe chete, pachinzvimbo chekushandisa chaicho mv kugadzirisa zita rimwe nerimwe ...

Chimwe chinhu chaunofanirwa kuziva usati wadzika kuzoshanda ndechekuti kana kana uchichinja kubva kumusoro kusvika pazasi unosangana nezita rimwe chete, saka haizoshandure. Iwe unotoziva kuti Linux ine case-sensitive muFS yako, saka zvine mutsindo. Izvi zvinoreva kuti kana iwe uine faira rakanzi Hello2 uye HELLO2, sisitimu inovasiyanisa. Asi, hongu…, pavanoenda kumavara madiki ivo vese vaizodaidzwa kuti hello2 uye izvo hazvigoneke. Naizvozvo, inokanda meseji yekukanganisa uye haina kuishandura.

Mushure meizvozvo iwe une zvese zvaunoda kuti uzive uye isu tinokwanisa kutanga kushandura mazita kubva kumusoro kusvika kudiki. Iyo generic raira Zvingave zvinotevera, uye iwe unogona kuzvishandura kunongedza kune dhairekitori iwe raunoda:

<br data-mce-bogus="1">

<em>find &lt;nombre_directorio&gt; -depth | xargs -n 1 rename -v 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;</em>

 

 

Iwe unofanira kutsiva nemazita edhairekitori kana nzira yedhairekitori iyo iwe yaunoda kugadzira yepasi. Semuenzaniso, semuenzaniso iwo wandinokuratidza mumufananidzo uri Test, asi zvinogona zvakare kuva chero imwe. Zve newbies, taura kuti nenzira ndinoreva iyo nzira, kana isiri yakananga mukati medhairekitori iwe uripo parizvino. Semuenzaniso, kana iwe uri mu ~ / asi uchida kuita pane / imba / mushandisi / Kurodha pasi.

Shandura iyo ive script

Kufambisa iyo wekumusoro uye wezasi kutendeuka, unogona kugadzira script rega zviitire iwe uye haufanire kuisa iwo wekumusoro kuraira nguva dzese iwe paunoda shanduko. Izvi zvinonyanya kubatsira kune avo vanogara vachipfuura mazita. Zvakare, kana iwe ukaiisa mukati meimwe yeiyo nzira ye $ PATH nharaunda inoshanduka, unogona kuzviita nekungodaidza zita rayo, pasina kuve nazvo mudhairekitori rimwe chete rauri kushanda kana kudoma nzira izere ...

ari nhanho dzaunofanirwa kutevedzera kugadzira iyo inoshandura script Ndizvo:

  • Yokutanga ndeye enda ku / bin dhairekitori kuisa iyo script ipapo uye nekuishandisa seimwewo murairo, uchingodaidza zita rayo kubva kuchiteshi.
<br data-mce-bogus="1">

cd ~/bin<br data-mce-bogus="1">

 

  • Ipapo gadzira nano, kana neyaunofarira mavara edhitaina, iyo faira ine script uye uidane chero chaunoda. Ndiri kuenda kuidaidza kuti mayutominu:
sudo nano mayutominu.sh

  • Mukati nano iwe unofanirwa kunama unotevera mavara eiyo kodhi yechinyorwa ichi kubva bash:
</pre><pre>#!/bin/bash
if [ -z $1 ];then
echo "Uso :$(basename $0) parent-directory"
exit 1
fi

all="$(find $1 -depth)"

for name in ${all}; do
new_name="$(dirname "${name}")/$(basename "${name}" | tr '[A-Z]' '[a-z]')"
if [ "${name}" != "${new_name}" ]; then
[ ! -e "${new_name}" ] &amp;&amp; mv -T "${name}" "${new_name}"; echo "${name} was renamed to ${new_name}" || echo "${name} wasn't renamed!"
fi

done
exit 0</pre><pre>
  • Iye zvino chengetedza iyo faira uchishandisa kiyi yekubatanidza Ctrl + O uye kubuda neCtrl + X. Iwe unotova neyako mayutominu.sh faira yakagadzirwa neiyo script, inotevera iri ipa mvumo yekuurayiwa:
sudo chmod +x mayutominu.sh
  • Iwe wakazozviwana yagadzirira kushandisa. Zvinoitwa sei? Zvakanaka, kuenderera nemuenzaniso iwoyo kubva muchikamu chakapfuura, kana iwe waida kushandura mazita eiyo Test dhairekitori kubva kumusoro kusvika kudiki, unogona kuita zvinotevera:
mayutominu Prueba
  • Iwe unoziva, kana iwe uchida kudoma iyo nzira izere, kana nzira, iwe unogona zvakare, kana dhairekitori racho risiri munzvimbo iripo. Semuyenzaniso:
mayutominu /home/usuario/Descargas

Ndinovimba yakabatsira iwe, iwe unoziva kuti chero mibvunzo kana mazano, unogona kusiya zvaunotaura...


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

Mhinduro, siya zvako

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  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.   yo akadaro

    Muna debian zvinondiudza izvi:
    -bash: syntax kukanganisa padhuze kusatarisika chiratidzo `newline

    tsvaga -kudzika | xargs -n 2 rename -v 's /(.

bool (chokwadi)