Nyob rau txhua qhov kev ua haujlwm, txawm tias Linux lossis Windows, koj yuav tsum tau hloov cov npe ntawv. Thiab yog tias cov neeg siv Windows cuam tshuam cov haujlwm no yam tsis muaj teeb meem tsis tsim nyog, ces nyob rau Linux lawv yuav ntsib teeb meem, vim tsis muaj kev paub txog cov kab ke thiab qhov muaj ntau yam. Kab lus no yuav teev txhua qhov ua tau txawv ntawm yuav ua li cas koj tuaj yeem hloov npe ntawm cov ntaub ntawv ntawm Linux.
Nyeem kuj:
Yuav tsim li cas lossis rho tawm cov ntawv hauv Linux
Yuav ua li cas thiaj nrhiav tau tawm Linux kis version
Txoj Kev 1: pyRenamer
Hmoov tsis software pyRenamer tsis muab rau hauv pob khoom txheem txheem preset. Txawm li cas los xij, zoo li txhua yam ntawm Linux, nws tuaj yeem rub tawm thiab teeb tsa los ntawm lub chaw sau ntawv raug cai. Qhov hais kom ua kom rub tawm thiab nruab yog li hauv qab no:
sudo Apt nruab pyrenamer
Tom qab nkag mus rau nws, sau tus password thiab nyem SauCov. Tom ntej no, koj yuav tsum paub meej tias cov kev ua. Ua li no, sau tus ntawv D thiab nyem dua SauCov. Txhua yam uas tau nyob tos yog tos rau qhov rub thiab rub tawm (tsis txhob kaw "Terminal" kom txog thaum cov txheej txheem tiav).
Tom qab kev teeb tsa, qhov kev zov me nyuam yuav tau tsim los ntawm thawj tshawb cov kab ke nrog nws lub npe.
Lub ntsiab qhov txawv pyRenamer los ntawm tus thawj tswj hwm cov ntaub ntawv yog tias daim ntawv thov muaj peev xwm sib cuam tshuam nrog ntau cov ntaub ntawv ib zaug. Nws yog qhov zoo meej hauv qhov xwm txheej uas koj xav tau hloov lub npe hauv ntau cov ntaub ntawv ib zaug, tshem qee qhov lossis hloov nrog lwm.
Cia peb saib ntawm kev ua haujlwm ntawm kev hloov pauv cov ntaub ntawv hauv ib qho program:
- Thaum qhib qhov kev pab cuam, koj yuav tsum tau pua txoj hauv kev rau cov ntawv taw qhia qhov chaw cov ntaub ntawv yuav tsum tau hloov npe dua. Nws yog ua tiav hauv laug ua haujlwm qhov rai (1)Cov. Tom qab txhais cov npe hauv txoj cai ua hauj lwm qhov rai (2) Txhua cov ntaub ntawv hauv nws yuav raug qhia tawm.
- Tom ntej no, mus rau hauv lub tab "Hloov chaw".
- Hauv kab ntawv no, koj yuav tsum khij lub npov nyob ze "Hloov"kom cov tswv yim ntawv nquag.
- Tam sim no koj tuaj yeem pib hloov npe cov ntaub ntawv hauv phau ntawv xaiv. Xav txog cov piv txwv ntawm plaub ntawv "Cov ntaub ntawv tsis qhia npe" nrog ordinal. Cia peb hais tias peb yuav tsum hloov cov lus "Cov ntaub ntawv tsis qhia npe" ib lo lus Cov ntaub ntawvCov. Ua li no, nkag mus rau hauv hloov ntawm cov ntawv npe hauv thawj daim teb, hauv qhov no "Cov ntaub ntawv tsis qhia npe", thiab nyob hauv kab lus thib ob, uas yuav hloov - Cov ntaub ntawv.
- Txhawm rau pom dab tsi yuav tshwm sim, koj tuaj yeem nias lub pob nyem "Saib Ua Ntej" (1)Cov. Txhua yam hloov yuav tshwm sim hauv lub graph. "Renamed cov ntaub ntawv npe" hauv lub qhov rais ua hauj lwm txoj cai.
- Yog tias hloov pauv haum koj, koj tuaj yeem nyem lub pob nyem "Pauv npe"yuav thov lawv rau cov ntawv xaiv.
Tom qab hloov npe, koj tuaj yeem kaw qhov kev zov me nyuam kom nyab xeeb thiab qhib tus thawj tswj hwm cov ntaub ntawv los xyuas cov kev hloov pauv.
Tiag tiag siv pyRenamer Koj tuaj yeem ua ntau ntau cov yeeb yam nrog cov ntaub ntawv. Tsis tas hloov ib feem ntawm lub npe nrog lwm qhov, tab sis siv cov qauv hauv cov tab "Qauv", teeb lub zog, thiab, tswj lawv, hloov cov npe cov ntaub ntawv raws li koj nyiam. Tab sis txhua yam, tsis muaj laj thawj xim rau cov lus qhia, vim tias thaum koj hover dhau lub teb nquag, ib qhov hint yuav tshwm.
Txoj Kev 2: Qhov Chaw Nres Tsheb
Hmoov tsis zoo, nws tsis yog ib txwm ua tau kom hloov cov ntaub ntawv siv cov kev pabcuam tshwj xeeb nrog lub graphical interface. Qee lub sijhawm ib qho yuam kev lossis qee yam zoo sib xws yuav tshwm sim uas cuam tshuam txoj haujlwm. Tab sis hauv Linux muaj ntau ntau dua ib txoj kev los ua kom tiav txoj haujlwm, yog li peb ncaj qha mus rau "Chaw Nres Tsheb".
Mv pab neeg
Pab (team) mv ntawm Linux, nws yog lub luag haujlwm rau kev txav cov ntaub ntawv los ntawm ib phau ntawv mus rau lwm lub. Tab sis ntawm nws cov tub ntxhais, txav cov ntaub ntawv zoo ib yam li kev hloov npe. Yog li, siv cov lus txib no, yog tias koj tsiv tawm ntawv mus rau tib lub nplaub tshev uas nws qhov chaw nyob, thaum teeb lub npe tshiab, koj yuav tuaj yeem hloov npe tshiab.
Tam sim no cia peb nrog pab neeg hauv kev nthuav dav mv.
Syntax thiab cov kev xaiv rau mv hais kom ua
Cov syntax muaj raws li nram no:
mv option original_file_name file_name tom qab rename
Txhawm rau siv txhua tus yam ntxwv ntawm pawg no, koj yuav tsum kawm nws cov kev xaiv:
- -i - thov kev tso cai thaum hloov cov ntaub ntawv uas twb muaj lawm;
- -f - hloov cov ntaub ntawv uas twb muaj lawm yam tsis tau kev tso cai;
- -n - txwv tsis pub hloov cov ntaub ntawv uas twb muaj lawm;
- -u - Cia hloov cov ntaub ntawv yog tias muaj kev hloov hauv nws;
- -v - qhia tag nrho cov ntaub ntawv tiav (npe).
Tom qab peb xam tag nrho cov yam ntxwv ntawm pawg mv, koj tuaj yeem mus ncaj qha rau cov txheej txheem renaming nws tus kheej.
Piv txwv ntawm kev siv mv tus hais kom ua
Tam sim no peb yuav xav txog qhov xwm txheej thaum nyob hauv daim nplaub tshev "Cov ntaub ntawv" muaj cov ntaub ntawv nrog lub npe "Cov ntaub ntawv qub", peb tes haujlwm yog kom hloov nws lub npe mus rau "Cov ntaub ntawv tshiab"siv cov lus txib mv hauv "Chaw Nres Tsheb"Cov. Txhawm rau ua qhov no, peb yuav tsum nkag mus:
mv -v "Cov ntaub ntawv qub" "Cov ntaub ntawv tshiab"
Nco tseg: rau qhov kev khiav lag luam kom ua tiav, koj yuav tsum qhib cov ntawv ceev tseg hauv "Lub Chaw Nres Tsheb" thiab tsuas yog tom qab ntawd nqa tawm txhua txoj kev kho. Koj tuaj yeem qhib daim nplaub tshev hauv qhov "Terminal" siv daim cd.
Ib qho piv txwv:
Raws li koj tuaj yeem pom hauv daim duab, cov ntaub ntawv peb xav tau txais lub npe tshiab. Thov nco ntsoov tias cov kev xaiv tau taw qhia hauv "Terminal" "-v", uas nyob rau ntawm kab hauv qab no nthuav tawm cov ncauj lus kom ntxaws ntxaws ntawm kev ua haujlwm tau ua.
Kuj tseem siv qhov lus txib mv, koj tuaj yeem tsis tsuas hloov lub npe cov ntaub ntawv, tab sis kuj txav nws mus rau lwm daim nplaub tshev nrog txoj kev. Raws li hais los saum toj no, lo lus txib no yog rau qhov no thiab xav tau. Ua li no, ntxiv rau kev teev cov ntaub ntawv npe, koj yuav tsum qhia kom meej txoj hauv kev rau nws.
Cia peb hais tias koj xav tau los ntawm ib daim nplaub tshev "Cov ntaub ntawv" txav cov ntaub ntawv "Cov ntaub ntawv qub" rau nplaub tshev "Video" renaming nws hauv dua "Cov ntaub ntawv tshiab"Cov. Ntawm no yog cov lus txib yuav zoo li cas:
mv -v / tsev / cov neeg siv / Cov ntaub ntawv / "Daim Ntawv Qub" / tsev / siv / Yees duab / "Cov Ntawv Tshiab"
Tseem ceeb: yog tias cov ntaub ntawv npe muaj ob los sis ntau cov lus, nws yuav tsum muab ntim nrog rau hauv kab ntawv cim.
Ib qho piv txwv:
Nco tseg: yog tias koj tsis muaj txoj cai nkag mus rau lub nplaub tshev uas koj yuav tsiv mus rau cov ntaub ntawv, rov qab hloov raws txoj kev, koj yuav tsum ua lub luag haujlwm los ntawm tus superuser los ntawm sau "super su" thaum pib thiab nkag mus rau lo lus zais.
Pauv nqe lus txib
Pab (team) mv zoo thaum koj xav tau rau rename ib qho ntaub ntawv. Thiab, qhov tseeb, nws tsis tuaj yeem pom qhov hloov pauv hauv qhov no - nws yog qhov zoo tshaj plaws. Txawm li cas los xij, yog tias koj xav tau hloov npe ntau cov ntaub ntawv lossis hloov tsuas yog ib feem ntawm lub npe, ces pawg neeg yuav nyiam hloov npe.
Hloov qhov kev hais kom ua syntax thiab xaiv
Ib yam li cov lus txib dhau los, peb yuav xub ua thawj lub syntax hloov npeCov. Nws zoo li qhov no:
rename option 's / old_file_name / new_file_name /' file_name
Raws li koj tuaj yeem pom, cov qauv ntawv muaj ntau cov lus nyuab dua qhov hais kom ua mvTxawm li cas los xij, nws tso cai rau koj ua ntau dua nrog cov ntawv.
Tam sim no cia saib cov kev xaiv, lawv muaj raws li hauv qab no:
- -v - qhia cov ntaub ntawv tiav;
- -n - saib ua ntej hloov;
- -f - Yuam tshem tawm txhua cov ntaub ntawv.
Tam sim no cia saib ntawm cov piv txwv piv txwv ntawm cov lus txib no.
Piv txwv ntawm kev siv lub rename qhov hais kom ua
Cia peb hais hauv phau ntawv teev npe "Cov ntaub ntawv" peb muaj ntau cov ntaub ntawv hu ua "Cov lej txheej txheem qub"qhov twg tooj yog ib tus lej tooj. Peb lub luag haujlwm siv pab pawg hloov npe, hauv txhua cov ntaub ntawv no hloov lo lus "Laus" rau "Tshiab"Cov. Txhawm rau ua qhov no, peb yuav tsum khiav cov lus txib nram qab no:
rename -v's s / Old / New / '*
qhov twg "*" - tag nrho cov ntaub ntawv nyob rau hauv cov qhia chaw.
Nco tseg: yog tias koj xav hloov pauv ntawm ib qho ntaub ntawv, tom qab ntawd sau nws lub npe hloov "*". Tsis txhob hnov qab, yog tias lub npe muaj ob los sis ntau lo lus, ces nws yuav tsum raug hais.
Ib qho piv txwv:
Nco tseg: nrog rau cov lus txib no koj tuaj yeem yooj yim hloov cov ntawv txuas ntxiv los ntawm kev teev tus qub txuas thaum pib, sau nws, piv txwv li " .txt", thiab tom qab ntawd ib qho tshiab, piv txwv li, " .html".
Siv kev hais kom ua hloov npe Koj tuaj yeem hloov qhov teeb meem ntawm lub npe ntawv. Piv txwv li, peb xav tau cov ntaub ntawv npe "TSHIAB NTAUB NTAWV (tooj)" rename mus "tshiab cov ntaub ntawv (tooj)"Cov. Ua li no, sau cov lus hauv qab no:
rename -v 'y / A-Z / a-z /' *
Ib qho piv txwv:
Nco tseg: yog tias koj xav hloov rooj plaub hauv cov ntaub ntawv npe ntawm Lavxias, tom qab ntawd siv cov lus txib "hloov pauv -v 'y / А-Я / а-я /' *".
Txoj Kev 3: Tus Thawj Tswj Ntaub Ntawv
Tu siab nyob hauv "Chaw Nres Tsheb" tsis yog txhua tus neeg siv yuav muaj peev xwm paub nws, yog li nws yuav paub qab hau los xav txog yuav ua li cas rau rename cov ntaub ntawv siv cov graphical interface.
Kev sib cuam tshuam nrog cov ntaub ntawv hauv Linux yog qhov zoo uas yuav tau ua nrog tus thawj tswj ntaub ntawv, seb Nautilus, Ntses lossis lwm yam (nyob ntawm Linux faib). Nws tso cai rau koj ua kom pom tseeb tsis yog cov ntaub ntawv, tab sis kuj muaj cov ntawv sau npe, nrog rau cov chaw tswj kav, txhim kho lawv cov hierarchy hauv cov qauv uas nkag siab ntxiv rau cov neeg siv tsis paub. Hauv cov thawj tswj hwm zoo li no, txawm tias tus pib tshiab uas nyuam qhuav tau nruab Linux rau nws tus kheej tuaj yeem nrhiav nws txoj hauv kev yooj yim.
Hloov kho ib daim ntawv uas siv tus thawj tswj hwm cov ntaub ntawv yog qhov yooj yim:
- Txhawm rau pib, koj yuav tsum qhib tus thawj tswj nws tus kheej thiab mus rau hauv cov ntawv taw qhia qhov chaw uas cov ntawv uas yuav tsum tau hloov npe yog nyob.
- Tam sim no koj yuav tsum yuj dua nws thiab nyem lub sab laug nas khawm (LMB) los xaiv. Tom qab ntawd tus yuam sij F2 los sis txoj cai nas khawm thiab xaiv “Rename”.
- Ib daim foos txhawm rau ntxiv tshwm hauv qab ntawm cov ntaub ntawv, thiab cov ntawv npe nws tus kheej dhau los ua lub siab. Koj tsuas yog yuav tsum sau lub npe koj xav tau thiab nias tus yuam sij Sau kom paub meej tias cov kev pauv.
Yog li yooj yim thiab ceev koj tuaj yeem hloov npe cov ntaub ntawv hauv Linux. Cov kev qhia tawm ua haujlwm nyob rau hauv txhua cov ntaub ntawv tswj hwm ntawm ntau yam kev faib tawm, txawm li cas los xij, tej zaum yuav muaj qhov sib txawv ntawm qee lub npe interface lossis hauv lawv cov zaub, tab sis lub ntsiab lus dav dav ntawm kev nqis tes ua zoo ib yam.
Xaus
Yog li ntawd, peb tuaj yeem hais tias muaj ntau txoj kev rau kev hloov npe cov ntaub ntawv hauv Linux. Lawv txhua tus puav leej txaus sib txawv ntawm lwm tus thiab yog qhov tseem ceeb hauv ntau yam xwm txheej. Piv txwv li, yog tias koj xav hloov npe ib qho ntaub ntawv, nws zoo dua yog siv tus thawj tswj hwm cov txheej txheem ntawm lub system lossis cov lus txib mvCov. Thiab nyob rau hauv cov ntaub ntawv ntawm ib nrab lossis ntau lub npe hloov, qhov kev zov me nyuam zoo tag nrho pyRenamer lossis pab pawg hloov npeCov. Koj tsuas muaj ib qho tawm ntawm qhov - los txiav txim siab siv txoj kev twg.