The attrib hais kom ua lossis hloov cov yam ntxwv ntawm cov ntaub ntawv rau cov ntaub ntawv lossis cov ntawv tais ceev tseg. Nws tau khiav los ntawm Command Prompt hauv txhua lub versions ntawm Windows.
'Attrib' Command Availability
The attrib hais kom ua muaj nyob rau hauv Command Prompt hauv txhua qhov Windows operating systems suav nrog Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, ntxiv rau cov laus ntawm Windows ib yam.
Txhua yam kev kuaj mob offline thiab kho cov cuab yeej muaj nrog ntau lub versions ntawm Windows, suav nrog Advanced Startup Options, System Recovery Options, thiab Recovery Console, kuj suav nrog attrib i n qee lub peev xwm.
This attrib hais kom ua kuj muaj nyob rau hauv MS-DOS raws li DOS hais kom ua.
Qhov muaj qee yam attrib cov lus txib hloov thiab lwm yam attrib hais kom ua syntax yuav txawv ntawm kev khiav hauj lwm rau kev ua haujlwm.
'Attrib' Command Syntax & Hloov
Cov lus txib siv daim ntawv dav dav hauv qab no:
attrib [+a|-a] [+h|-h] [+i|-i] [+r|-r] [+s|-s] [+v|-v] [+ x|-x] [drive:][path][filename] [/s [/d][/l]
Yog tias koj tsis paub meej tias yuav txhais li cas rau qhov attrib command syntax koj pom saum toj no lossis qhia hauv cov lus hauv qab no, nws tau qhia kom kawm paub nyeem cov lus hais kom ua li cas.
Attrib Command Options | |
---|---|
piav qhia | |
attrib | Ua cov attrib hais kom ua ib leeg kom pom cov cwj pwm teeb tsa ntawm cov ntaub ntawv hauv cov npe uas koj ua tiav cov lus txib los ntawm. |
+a | Tsim cov ntaub ntawv khaws tseg rau cov ntaub ntawv lossis cov npe. |
- a | Clear the archive attribute. |
+h | Tsim cov ntaub ntawv zais rau cov ntaub ntawv lossis cov npe. |
- h | Clear tus cwj pwm zais. |
+i | Tsim cov 'tsis muaj cov ntsiab lus indexed' tus cwj pwm rau cov ntaub ntawv lossis cov npe. |
- i | Clears 'tsis cov ntsiab lus indexed' cov ntaub ntawv tus cwj pwm. |
+r | Teem cov ntawv nyeem nkaus xwb rau cov ntaub ntawv lossis cov npe. |
- r | Clear the read-only attribute. |
+s | Tshuaj cov ntaub ntawv system tus cwj pwm rau cov ntaub ntawv lossis cov npe. |
- s | Clear the system attribute. |
+v | Tsim cov ntaub ntawv ncaj ncees rau cov ntaub ntawv lossis cov npe. |
- v | Clear the integrity attribute. |
+x | Tshuaj tsis muaj cov ntaub ntawv rub tawm rau cov ntaub ntawv lossis cov npe. |
- x | Ntawm qhov tsis txhuam tus cwj pwm. |
drive :, path, filename | Nov yog cov ntaub ntawv (filename, optionally with drive and path), directory (path, optionally with drive), or drive that you want to view or change the attributes of. Tso cai siv Wildcard. |
/s | Siv qhov hloov pauv no los ua txhua yam ntaub ntawv tus cwj pwm tso saib lossis hloov pauv koj tab tom ua ntawm cov subfolders nyob rau hauv qhov twg tsav thiab / lossis txoj hauv kev koj tau teev tseg, lossis cov nyob hauv daim nplaub tshev uas koj tab tom ua los ntawm yog tias koj tsis ua. qhia ib tsav los yog txoj kev. |
qhov kev xaiv no suav nrog cov npe, tsis yog cov ntaub ntawv nkaus xwb, rau txhua yam koj tab tom ua. Koj tsuas siv tau /d nrog /s. | |
/l | Qhov /l kev xaiv siv txhua yam koj ua nrog cov lus txib attrib rau Symbolic Link nws tus kheej tsis yog lub hom phiaj ntawm Symbolic Link. Lub /l hloov tsuas ua haujlwm thaum koj tseem siv lub /s hloov. |
/? | Siv cov kev pab hloov nrog cov lus txib attrib los qhia cov ntsiab lus ntawm cov kev xaiv saum toj no nyob rau hauv Command Prompt window. Executing attrib /? yog tib yam li siv cov lus txib pab kom ua tiav help attrib. |
In Recovery Console, +c thiab - c hloov siv rau attrib. Lawv teeb thiab tshem tawm cov ntaub ntawv compressed attribute, feem. Sab nraum ntawm qhov chaw kuaj mob no hauv Windows XP, siv cov lus txib compact los tswj cov ntaub ntawv compression los ntawm kab hais kom ua.
Thaum ib daim ntawv tso cai nrog attrib, nws txhais tau tias koj tuaj yeem siv lub hnub qub los siv tus cwj pwm rau ib pawg ntawm cov ntaub ntawv. Txawm li cas los xij, yog tias tsim nyog, koj yuav tsum tshem lub kaw lus lossis cov cwj pwm zais ua ntej ua ntej koj tuaj yeem hloov pauv ib qho ntawm cov ntaub ntawv lwm tus cwj pwm.
Attrib Command Piv txwv
attrib +r c:\windows\system\secretfolder
Hauv qhov piv txwv saum toj no, attrib tig rau ntawm tus cwj pwm nyeem nkaus xwb, siv qhov kev xaiv +r, rau cov ntaub ntawv zais zais nyob hauv c:\windows\system.
attrib -h c:\config.sys
Hauv qhov piv txwv no, cov ntaub ntawv config.sys nyob rau hauv lub hauv paus directory ntawm c: tsav muaj nws cov ntaub ntawv zais tus cwj pwm tshem tawm los ntawm kev siv qhov kev xaiv -h.
attrib -h -r -s c:\boot\bcd
Lub sijhawm no, attrib tshem tawm ntau cov ntaub ntawv cwj pwm los ntawm cov ntaub ntawv bcd, cov ntaub ntawv tseem ceeb uas yuav tsum ua haujlwm rau Windows pib. Qhov tseeb, ua raws li attrib hais kom ua, raws li qhia saum toj no, yog ib feem tseem ceeb ntawm cov txheej txheem tau teev tseg hauv cov kauj ruam tsim nyog rau kev tsim kho BCD hauv Windows.
attrib +a f:. & attrib -a f:.bak
Nrog rau qhov piv txwv saum toj no, peb tab tom thov +a los teeb tsa tus cwj pwm archive ntawm tag nrho cov ntaub ntawv uas muaj nyob rau ntawm f: tsav, tab sis tom qab ntawd siv & tshem tawm cov cim archive ntawm txhua cov ntaub ntawv ntawm f: uas muaj qhov.bak file extension.
Hauv qhov piv txwv saum toj no, BAK cov ntaub ntawv qhia cov ntaub ntawv uas twb tau rov qab lawm, txhais tau tias lawv tsis tas yuav khaws cia / thaub qab dua, yog li xav tau tshem tawm cov khoom khaws cia.
attrib myimage.jpg
Kom xaus nrog qhov yooj yim attrib piv txwv, qhov no tsuas yog qhia cov yam ntxwv ntawm cov ntaub ntawv npe hu ua myimage.jpg. Yog tias koj yuav tsum tshem tawm ib nrab thib ob thiab ua tiav tsuas yog attrib hais kom ua, nws yuav tso tawm cov cwj pwm rau txhua cov ntaub ntawv hauv cov npe tam sim no.
Attrib Command yuam kev
Raws li feem ntau cov lus txib hauv Command Prompt, siv ob nqe lus nyob ib ncig ntawm lub nplaub tshev lossis cov npe cov ntaub ntawv uas muaj qhov chaw. Yog tias koj tsis nco qab ua qhov no nrog cov lus txib attrib, koj yuav tau txais "Parameter hom tsis raug -" yuam kev.
Piv txwv li, es tsis txhob ntaus kuv lub nplaub tshev hauv Command Prompt kom qhia txoj hauv kev mus rau ib daim nplaub tshev los ntawm lub npe ntawd, koj yuav ntaus "kuv folder" siv cov quotes.
Attrib cov lus txib yuam kev xws li Access Denied txhais tau tias koj tsis muaj kev nkag tau txaus rau cov ntaub ntawv koj tab tom sim ua kom hloov pauv rau. Ua tswv cuab ntawm cov ntaub ntawv hauv Windows thiab sim dua.
Hloov pauv hauv Attrib Command
The +i, - i, thiab /l attrib command xaiv tau ua ntej muaj nyob rau hauv Windows Vista thiab tau khaws cia los ntawm Windows 10.
+v, - v, +x, - x keyboards rau attrib cov lus txib tsuas muaj nyob hauv Windows 7, Windows 8, thiab Windows 10.
'Attrib'-Related Commands
Nws yog ib qho rau xcopy hais kom ua rau cov ntaub ntawv tus cwj pwm tom qab nws thaub qab ib yam dab tsi. Piv txwv li, qhov xcopy hais kom ua /m hloov pauv tus cwj pwm archive tom qab cov ntaub ntawv tau theej lawm.
Ib yam li ntawd, qhov xcopy /k hloov khaws cov ntaub ntawv tus cwj pwm nyeem nkaus xwb thaum nws tau theej.
Saib cov cwj pwm hauv Explorer
Koj tuaj yeem saib thiab tswj hwm tus cwj pwm rau cov ntaub ntawv thiab cov folders hauv Explorer siv cov ntawv qhia zaub mov tsis tu ncua. Qhov no yuav nyiam rau koj yog tias koj tsis paub txog kab hais kom ua.
Ua li no los ntawm txoj cai-nias qhov khoom thiab nkag mus rau hauv nws Properties > General tab.