Linux nrhiav cov piv txwv

Pin
Send
Share
Send

Cov neeg tswj xyuas cov ntaub ntawv nrov tshaj plaws rau Linux-based operating systems muaj cov cuab yeej tshawb fawb tau haum. Txawm li cas los xij, cov xaim uas tsis ib txwm muaj nyob hauv nws yog qhov txaus rau tus neeg siv tshawb rau cov ntaub ntawv tsim nyog. Hauv qhov no, tus nqi hluav taws xob ua qauv los ntawm "Chaw Nres Tsheb"Cov. Nws tso cai rau koj kom yooj yim nrhiav cov ntaub ntawv xav tau hauv cov ntawv qhia tshwj xeeb lossis hauv tag nrho cov system los ntawm nkag mus rau ib qho lus txib, kev sib cav thiab kev xaiv.

Siv nrhiav qhov hais kom ua ntawm Linux

Pab (team) nrhiav tau tsim los nrhiav ntau yam khoom, nrog rau cov ntaub ntawv ntawm txhua hom ntawv thiab cov ntawv sau ntawm ntau qhov tob. Tus neeg siv tsuas yog yuav tsum tau nkag mus rau lo lus txib nws tus kheej, qhia kom meej cov yam xav tau thiab muab cov lus sib cav los teeb tsa qhov cuam tshuam. Kev tua ntawm cov txheej txheem los ntawm cov nqi hluav taws xob nws tus kheej feem ntau tsis siv sijhawm ntau, tab sis qhov no tseem nyob ntawm tus nqi ntawm cov ntaub ntawv xov xwm. Tam sim no cia nyob ntawm siv piv txwv nrhiav tau nyob rau hauv ntau dua.

Mus rau cov ntawv qhia hauv lub console

Yuav pib nrog, Kuv xav nqis rov qab me ntsis los ntawm pab pawg tseem ceeb thiab kov lub ncauj lus ntawm cov haujlwm ntxiv uas yuav pab tau rau yav tom ntej thaum tswj los ntawm lub console. Qhov tseeb yog tias cov nqi hluav taws xob nyob hauv Linux faib tsis tau ntse los ntawm kev tshawb rau txhua yam hauv computer. Tag nrho cov txheej txheem yuav tsum tau pib nkaus xwb nrog rau tag nrho qhov chaw mus rau cov khoom lossis mus rau qhov chaw nyob los ntawm kev hais kom ua cdCov. Qhov no tuaj yeem ua tau yooj yim:

  1. Qhib tus neeg saib xyuas cov ntaub ntawv nruab thiab mus rau qhov chaw ntawv ntawd, koj xav siv cov lus txib yav tom ntej nrhiav tau.
  2. Ntawm ib yam khoom, nyem RMB thiab nrhiav "Khoom".
  3. Koj yuav pom nws niam cov ntawv tais ceev tseg nrog txoj kev tag nrho. Nco ntsoov nws ua qhov hloov ntawm "Chaw Nres Tsheb".
  4. Tam sim no pib lub console, piv txwv li, los ntawm cov ntawv qhia zaub mov.
  5. Sau cov lus txib rau ntawdcd / tsev / neeg siv / nplaub tshevqhov twg neeg siv yog lub npe ntawm tus neeg siv lub tsev sis, thiab ntawv tais ceev tseg - lub npe ntawm cov ntawv yuav tsum muaj.

Yog tias ua ntej siv nrhiav tau, ua raws cov lus qhia saum toj no, koj tsis tuaj yeem sau tag nrho txoj hauv kev rau cov ntawv, muab tias nws nyob hauv qhov chaw xaiv. Xws li txoj kev daws teeb meem yuav ua rau kom lub suab nkag siab ntawm cov lus txib yav tom ntej.

Nrhiav cov ntaub ntawv hauv cov npe tam sim no

Thaum uanrhiav tauntawm lub console nyuam qhuav pib, koj yuav tau txais cov txiaj ntsig kev tshawb fawb hauv koj cov neeg siv lub npe nyob hauv tsev. Hauv lwm qhov xwm txheej, piv txwv li, thaum koj qhib lub sijhawm tshawb fawb los ntawm qhov chaw, hauv cov txiaj ntsig koj yuav pom txhua subfolders thiab cov ntaub ntawv ntawm qhov chaw no nyob rau hauv lawv.

Kev ua kom mus nrhiav tau tsis muaj kev sib cav thiab kev xaiv tau siv thaum koj xav tau saib tag nrho cov ntsiab ntawm ib zaug. Yog tias lawv lub npe tsis haum rau hauv kab, koj yuav tsum hloov txoj kev hais kom nws nqa tawm hauv daim ntawvnrhiav tau. -printaub.

Nrhiav cov ntaub ntawv hauv cov npe uas tau sau tseg

Qhov kev hais kom ua cov ntaub ntawv los ntawm ib txoj kev tau muab yog qhov tsis txawv ntawm qhov peb tau hais los saum no. Koj yuav tsum tau muab tshuajnrhiav tau, thiab tom qab ntawd ntxiv./folder, yog tias koj xav nrhiav cov ntaub ntawv hais txog cov npe hauv qhov chaw tam sim no, lossis koj yuav tsum qhia meej tag nrho txoj kev, los ntawm kev nkag mus, piv txwv,pom ./home/user/downloads/folderqhov twg ntawv tais ceev tseg - qhov kawg ntawv. Txhua lub caij yuav tso tawm kom pom nyias muaj nyias kab hauv qhov kev txiav txim ntawm lawv qhov tob.

Tshawb ntawm npe

Qee lub sij hawm qhov xav tau tso saib tsuas yog cov khoom txaus siab ntawm lub npe. Tom qab ntawd tus neeg siv yuav tsum tau tsim txoj kev xaiv sib txawv rau cov lus txib kom nws nkag siab txog kev rov hais dua. Cov kab nkag tau siv daim ntawv hauv qab no:nrhiav tau. -lub npe "lo lus"qhov twg lo lus - Cov lus tseem ceeb nrhiav, uas yuav tsum tau ntaus rau hauv ob kab lus thiab rooj plaub-sib txawv rau txhua tus xeeb ceem.

Yog tias koj tsis paub cov ntaub ntawv tseeb ntawm txhua tsab ntawv lossis yog koj xav kom qhia tag nrho cov npe tsim nyog yam tsis tau coj tus lej no mus rau hauv tus lej, nkag rau hauv lub consolenrhiav tau. -npe "lus".

Txhawm rau lim cov txiaj ntsig los ntawm lo lus tseem ceeb rau kev sib cav -Ua laib ib qho yog ntxiv. Pab neeg siv sijhawm los saibnrhiav tau. -tsuas-npe "lo lus"qhov twg lo lus - ib lo lus kom raug muab lwv.

Tseem qee zaum muaj qhov xav nrhiav khoom los ntawm ib tus yuam sij, tsis suav nrog lwm tus. Tom qab ntawd, nyeg, ntau txoj kev tshawb nrhiav tau muab rau ib zaug thiab cov kab nkag tau tau raws li hauv qab no:nrhiav tau. -lub npe "lo lus" -tsis npe "* .txt"Cov. Nco ntsoov tias tus thib ob sib cav nyob rau hauv nqe lus hais tias “* .txt ", uas txhais tau tias nrhiav tau Nws ua haujlwm tsis tsuas yog nrog cov npe, tab sis kuj nrog cov hom ntaub ntawv uas tau teeb tsa hauv daim foos no.

Kuj tseem muaj tus neeg ua hauj lwm LOSSISCov. Nws tso cai rau koj kom pom ib lossis ob peb nqe lus uas haum rau ib zaug. Txhua tus yog qhia nyias, nrog ntxiv ntawm kev sib cav sib ceg. Qhov tshwm sim yog kwv yees li cov hauv qab no:nrhiav-npe "lo lus" -o-npe "word1".

Qhia Kom Saib Qhov tob

Pab (team) nrhiav tau yuav pab cov neeg siv txawm tias thaum nws xav nrhiav cov ntsiab lus ntawm cov ntawv sau npe tsuas yog rau qhov tob uas tau hais tseg, piv txwv li, kev txheeb xyuas tsis tas yuav raug sab hauv lub subfolder thib peb. Txhawm rau teeb tsa xws li, nkag musnrhiav tau. -maxdepth N-lub npe "lo lus"qhov twg N - qhov siab tshaj plaws, thiab -lub npe "lo lus" - tej kev sib cav tom ntej.

Tshawb hauv ob peb phau ntawv sau npe

Hauv ntau phau ntawv teev npe muaj ntau nplaub tshev nrog ntau cov ntsiab lus ntawm ib zaug. Yog tias muaj cov lej loj ntawm lawv, thiab kev tshawb nrhiav yuav tsum tau nqa tawm tsuas yog qee yam, tom qab ntawd koj yuav tsum tau qhia qhov no thaum nkag mus rau cov lus txibnrhiav ./folder ./folder1 -type f -name "lo lus"qhov twg ./folder ./folder1 - cov npe ntawm qhov tsim nyog phau ntawv sau, thiab -lub npe "lo lus" - lwm yam kev sib cav.

Muab cov khoom zais zais

Tsis tas yuav tsum muaj tseeb cov lus sib cav, cov khoom zais nyob rau hauv cov ntawv qhia scanned yuav tsis muab tso rau hauv console. Yog li ntawd, tus neeg siv manually sau ntawv rau ib qho kev xaiv ntxiv kom kawg thaum kawg cov lus txib yuav zoo li no:pom ~ -type f-lub npe ". *"Cov. Koj yuav tau txais cov npe ua tiav ntawm txhua cov ntaub ntawv, tab sis yog tias qee qhov ntawm lawv txuas tsis tau, ua ntej lo lus nrhiav tau sau kab hauvsudoua kom muaj kev muaj cai superuser.

Luam theej duab hauv tsev rau cov pab pawg thiab cov neeg siv

Txhua tus neeg siv tuaj yeem tsim cov ntawv sau npe thiab khoom siv yam tsis muaj kev txwv hauv ntau qhov chaw. Txoj kev ceev tshaj plaws yog nrhiav cov ntaub ntawv uas yog ib ntawm ib tus neeg siv siv cov lus txib nrhiav tau thiab ib qho ntawm nws kev sib cav. Hauv "Chaw Nres Tsheb" sau tsegnrhiav tau. -user npe usernameqhov twg username - Lub npe username. Tom qab nkag mus, lub scan yuav pib cia.

Kwv yees li ntawm cov qauv qub ua haujlwm nrog cov pab pawg siv. Kev ntsuam xyuas ntawm cov ntaub ntawv cuam tshuam nrog ib ntawm cov pab pawg pib los ntawmnrhiav / var / www-pab pawg neeg lub npeCov. Tsis txhob hnov ​​qab tias muaj peev xwm muaj ntau qhov khoom thiab qee zaum nws yuav siv sij hawm ntau heev kom lawv txhua qhov tawm.

Lim uas hloov hnub

Cov operating system cia khaws cov ntaub ntawv hais txog hnub hloov kho ntawm txhua cov ntaub ntawv tam sim no. Pab (team) nrhiav tau tso cai rau koj mus nrhiav tau lawv tag nrho los ntawm cov kev ntsuas tshwj xeeb. Nws tsuas yog yuav tsum tau sau tsegsudo nrhiav /-sijhawm teev Nqhov twg N - tus naj npawb ntawm cov hnub dhau los thaum khoom siv tau hloov kho kawg. Lub Npe sudo ntawm no nws yog qhov tsim nyog nyob rau hauv thiaj li yuav tau txais cov ntaub ntawv hais txog cov ntaub ntawv npaj tsuas yog rau lub superuser.

Yog tias koj txaus siab nyob rau hauv kev saib cov khoom uas dhau los qhib qee lub hnub dhau los, tom qab ntawd txoj kab hloov nws qhov tsos me ntsis rausudo nrhiav / -atime N.

Cov Ntaub Ntawv Raws Li Lim Me Me

Txhua yam khoom tau nws tus kheej loj, ntsig txog, cov lus txib los tshawb rau cov ntaub ntawv yuav tsum muaj haujlwm uas tso cai rau koj kom lim lawv los ntawm qhov ntsuas no. nrhiav tau paub txog yuav ua li cas, tus neeg siv tsuas xav tau teeb tsa qhov loj nws tus kheej los ntawm kev sib cav. Cia li nkag muspom / -size Nqhov twg N - ntim hauv bytes, megabytes (M) lossis gigabytes (G).

Koj tuaj yeem hais tau ntau yam khoom uas koj tab tom nrhiav. Tom qab ntawd tus neeg txiav txim haum rau hauv kev hais kom ua thiab koj tau txais, piv txwv li, xws li kab:pom / -size + 500M -size -1000MCov. Xws li kev soj ntsuam yuav pom cov ntaub ntawv ntau dua 500 megabytes, tab sis tsawg dua 1000.

Nrhiav rau cov ntaub ntawv khoob thiab phau ntawv sau npe

Qee cov ntaub ntawv lossis ntawv tais khoob. Lawv tsuas yog xav tau qhov chaw disk ntxiv thiab qee zaum cuam tshuam nrog kev cuam tshuam ib txwm nrog lub khoos phis tawm. Lawv yuav tsum pom muaj nyob rau hauv kev txiav txim siab rau kev nqis tes ua ntxiv, thiab qhov no yuav pab taupom / nplaub tshev -qhia f -emptyqhov twg / nplaub tshev - qhov chaw uas scan ua.

Cais, Kuv xav luv luv hais lwm cov kev sib cav uas muaj txiaj ntsig uas ib lub sijhawm dhau los ua qhov muaj txiaj ntsig zoo rau tus neeg siv:

  • -Qhia- txwv tsuas yog ntawm cov kab ke tam sim no;
  • -ibpe f- tsuas tso saib cov ntaub ntawv xwb;
  • -ibpe d- qhia tsuas yog phau ntawv teev npe;
  • -nogroup,-nuav qab- tshawb cov ntaub ntawv uas tsis koom nrog pawg lossis tsis koom nrog tus siv;
  • -ibhawm- nrhiav kom paub lub version ntawm cov khoom siv tau siv.

Ntawm no kev paub nrog pab pawg nrhiav tau lawm. Yog tias koj xav kawm kom ntxaws lwm cov txheej txheem console cov cuab yeej ntawm kev ua haujlwm ntawm lub Linux pob, peb xav kom koj tig mus rau peb cov khoom siv cais ntawm cov ntawv txuas hauv qab no.

Ntau Ntxiv: Nquag Siv Lus txib nyob rau hauv Linux Terminal

Tom qab tshawb rau cov ntaub ntawv xav tau, koj tuaj yeem ua lwm yam nqis tes nrog lawv, piv txwv li, kho, txiav lossis kawm cov ntsiab lus. Lwm cov kev siv hauv tsev yuav pab tau. "Chaw Nres Tsheb"Cov. Koj yuav pom cov piv txwv ntawm lawv qhov kev siv hauv qab no.

Nyeem kuj: Linux grep / miv / ls cov lus txib hais

Pin
Send
Share
Send