File Attribute txhais (Dab tsi yog tus cwj pwm?)

Cov txheej txheem:

File Attribute txhais (Dab tsi yog tus cwj pwm?)
File Attribute txhais (Dab tsi yog tus cwj pwm?)
Anonim

Ib tus cwj pwm ntawm cov ntaub ntawv (feem ntau tsuas yog hu ua tus cwj pwm lossis tus chij) yog hom metadata uas txhais tau hais tias ib qho xwm txheej uas cov ntaub ntawv lossis cov npe tuaj yeem muaj nyob.

Tus cwj pwm tuaj yeem muaj nyob hauv ib qho ntawm ob lub xeev, yog li nws tau txiav txim siab yog teem lossis tshem tawm txhua lub sijhawm, txhais tau tias nws tau qhib lossis tsis yog.

Computer operating systems, zoo li Windows, tuaj yeem sau cov ntaub ntawv nrog cov ntaub ntawv tshwj xeeb kom nws tuaj yeem kho qhov sib txawv ntawm cov ntaub ntawv nrog tus cwj pwm muab tua.

Cov ntaub ntawv thiab cov folders tsis tau hloov pauv thaum cov yam ntxwv raug siv lossis tshem tawm, lawv tsuas yog nkag siab txawv ntawm kev khiav haujlwm thiab lwm yam software.

Image
Image

Dab tsi yog cov ntaub ntawv sib txawv?

Ib tus lej ntawm cov ntaub ntawv muaj nyob hauv Windows, suav nrog cov hauv qab no:

  • Archive file attribute
  • Directory attribute
  • Hidden file attribute
  • Read-only file attribute
  • System file attribute
  • Volume label attribute

Cov hauv qab no yog thawj zaug muaj rau Windows operating system nrog NTFS cov ntaub ntawv kaw lus, txhais tau tias lawv tsis muaj nyob rau hauv cov ntaub ntawv FAT qub:

  • Compressed file attribute
  • Encrypted file attribute
  • Indexed file attribute

Ntawm no yog ob peb ntxiv, txawm tias tsawg dua, cov neeg lees paub los ntawm Windows:

  • Device file attribute
  • Kev ncaj ncees cov ntaub ntawv attribute
  • Tsis yog cov ntsiab lus indexed cov ntaub ntawv tus cwj pwm
  • No scrub file attribute
  • Offline file attribute
  • Sparse file attribute
  • Cov ntaub ntawv ib ntus attribute
  • Virtual file attribute

Koj tuaj yeem nyeem ntxiv txog cov no ntawm Microsoft's File Attribute Constants nplooj.

Technically tseem muaj cov ntaub ntawv ib txwm muaj, txhais tau tias tsis muaj cov ntaub ntawv tus cwj pwm txhua, tab sis koj yuav tsis pom qhov no tau hais txog qhov twg hauv koj qhov kev siv Windows ib txwm siv.

Vim li cas cov ntaub ntawv siv tau?

Cov yam ntxwv ntawm cov ntaub ntawv muaj nyob kom koj, lossis ib qho kev pab cuam koj siv, lossis txawm tias lub operating system nws tus kheej, tuaj yeem tso cai lossis tsis lees paub cov cai tshwj xeeb rau cov ntaub ntawv lossis ntawv tais ceev tseg.

Kev kawm txog cov yam ntxwv ntawm cov ntaub ntawv tuaj yeem pab koj nkag siab tias vim li cas qee cov ntaub ntawv thiab cov folders raug hu ua "pob" lossis "nyeem nkaus xwb," piv txwv li, thiab vim li cas kev cuam tshuam nrog lawv txawv dua li kev cuam tshuam nrog lwm cov ntaub ntawv.

Kev siv cov ntawv nyeem nkaus xwb rau ib cov ntaub ntawv yuav tiv thaiv nws los ntawm kev hloov kho lossis hloov txhua txoj hauv kev tshwj tsis yog tias tus cwj pwm raug tshem tawm kom tso cai sau ntawv. Tus cwj pwm nyeem nkaus xwb feem ntau yog siv nrog cov ntaub ntawv kaw lus uas yuav tsum tsis txhob hloov pauv, tab sis koj tuaj yeem ua ib yam nrog koj tus kheej cov ntaub ntawv uas koj xav tau ib tus neeg uas muaj kev nkag tsis tau hloov kho.

Image
Image

Cov ntaub ntawv nrog cov khoom ntiag tug zais yuav raug muab zais los ntawm cov kev pom ib txwm muaj, ua rau lawv nyuaj heev kom rho tawm, txav mus los lossis hloov pauv. Cov ntaub ntawv tseem muaj xws li txhua lwm yam ntaub ntawv, tab sis vim hais tias tus cwj pwm zais yog toggled, nws tiv thaiv tus neeg siv xws li kev cuam tshuam nrog nws. Koj tuaj yeem teeb Windows kom pom cov ntaub ntawv zais thiab cov folders raws li txoj hauv kev yooj yim kom pom cov ntaub ntawv no yam tsis tas yuav tsum toggling tus cwj pwm tawm.

Koj tuaj yeem sib txuas cov yam ntxwv kom cov ntaub ntawv yog, piv txwv li, tsis yog zais nkaus xwb tab sis kuj tau cim ua cov ntaub ntawv kaw lus thiab teeb tsa nrog tus cwj pwm archive.

File Attributes vs. Folder Attributes

Cov cwj pwm tuaj yeem toggled rau thiab tawm rau ob qho tib si cov ntaub ntawv thiab cov folders, tab sis qhov tshwm sim ntawm kev ua li ntawd txawv me ntsis ntawm ob.

Thaum cov ntaub ntawv tus cwj pwm zoo li tus cwj pwm zais yog toggled rau ib cov ntaub ntawv, ib cov ntaub ntawv yuav muab zais, tsis muaj dab tsi ntxiv.

Yog tias tus cwj pwm zoo ib yam siv rau ib daim nplaub tshev, koj tau muab ntau txoj kev xaiv dua li tsuas yog zais lub nplaub tshev: koj muaj kev xaiv los siv tus cwj pwm rau daim nplaub tshev ib leeg lossis rau hauv nplaub tshev, nws cov subfolders, thiab tag nrho. ntawm nws cov ntaub ntawv.

Image
Image

Kev siv cov ntaub ntawv no rau lub nplaub tshev subfolders thiab nws cov ntaub ntawv txhais tau tias txawm tias tom qab koj qhib lub nplaub tshev, tag nrho cov ntaub ntawv thiab cov folders uas muaj nyob rau hauv nws yuav muab zais ib yam. Thawj qhov kev xaiv ntawm cia li nkaum lub nplaub tshev ib leeg yuav ua rau cov subfolders thiab cov ntaub ntawv pom, tab sis cia li nkaum lub ntsiab, hauv paus cheeb tsam ntawm daim nplaub tshev.

Yuav ua li cas cov ntaub ntawv tus cwj pwm raug siv

Txawm hais tias txhua tus cwj pwm muaj rau cov ntaub ntawv muaj cov npe nrov, uas koj pom hauv cov npe saum toj no, lawv tsis yog txhua tus siv rau cov ntaub ntawv lossis cov ntawv tais ceev tseg tib yam.

Kev xaiv me me ntawm tus cwj pwm tuaj yeem qhib tau ntawm tus kheej. Hauv Windows, koj tuaj yeem ua qhov no los ntawm txoj cai-nias (los yog kais-thiab-tuav ntawm kov interfaces) cov ntaub ntawv lossis cov ntawv tais ceev tseg, qhib nws cov khoom, thiab tom qab ntawd qhib lossis kaw cov cwj pwm los ntawm cov npe tau muab.

Image
Image

Hauv Windows, xaiv qhov loj dua ntawm cov cwj pwm kuj tuaj yeem teeb tsa nrog cov lus txib attrib, muaj los ntawm Command Prompt. Muaj tus cwj pwm tswj hwm los ntawm kev hais kom ua tso cai rau cov neeg thib peb cov kev pab cuam, zoo li cov software thaub qab, kom yooj yim hloov cov ntaub ntawv cwj pwm.

Image
Image

Yog tias koj luam cov ntaub ntawv nyeem nkaus xwb nrog xcopy hais kom ua, siv qhov /k kev xaiv hauv cov lus txib kom khaws cov ntaub ntawv tus cwj pwm nyob rau hauv qhov chaw khaws cia.

Linux kev khiav haujlwm tuaj yeem siv chattr (Hloov tus cwj pwm) kom teeb tsa cov yam ntxwv ntawm cov ntaub ntawv, thaum chflags (Hloov chij) yog siv hauv macOS.

Image
Image

FAQ

    Tus cwj pwm twg yog siv los zais cov ntaub ntawv kom nws tsis tshwm hauv daim ntawv teev npe?

    Tus hidden file tus cwj pwm zais cov ntaub ntawv thiab cov folders los ntawm cov npe. Txhawm rau siv tus cwj pwm no, nyem nyem rau ntawm cov ntaub ntawv thiab xaiv Properties > Hidden Txhawm rau saib tag nrho cov ntaub ntawv, suav nrog cov ntaub ntawv zais, los ntawm Command Prompt hauv Windows, siv qhov kev xaiv dir no: dir /a

    Cov ntaub ntawv twg tus cwj pwm txheeb xyuas cov ntaub ntawv raws li tau hloov kho txij li qhov thaub qab kawg?

    The archive file attribute marks files as modified-los yog tsim. Feem ntau, cov kev zov me nyuam tig tus cwj pwm no rau ntawm nws. Txhawm rau tig rau tus cwj pwm, txoj nyem rau ntawm cov ntaub ntawv > Properties > Advanced > Cov ntaub ntawv yog npaj rau archivingKoj tseem tuaj yeem siv attrib +a syntax hauv kab hais kom ua.

Pom zoo: