Umbuzo oqhelekileyo: Yintoni ikhonkco elinzima kwiLinux?

Ikhonkco eliqinileyo yifayile ekhomba kwi-inode enye engaphantsi, njengenye ifayile. Ukuba ucima ifayile enye, isusa ikhonkco enye kwi-inode engaphantsi. Ngelixa ikhonkco lomfuziselo (ekwaziwa njengekhonkco elithambileyo) ilikhonkco kwelinye igama lefayile kwindlela yefayile.

Kwi-computing, ikhonkco eliqinileyo lungeno lolawulo olunxulumanisa igama nefayile kwindlela yefayile. Zonke iisistim zefayile esekwe kulawulo kufuneka zibe nekhonkco elinye eliqinileyo elinika igama loqobo lefayile nganye. Igama elithi "ikhonkco elinzima" lidla ngokusetyenziswa kuphela kwiinkqubo zefayile ezivumela ukuba ngaphezu kwesinye ikhonkco elinzima kwifayile efanayo.

Yintoni ikhonkco elithambileyo kunye nekhonkco elilukhuni kwiLinux? Ikhonkco elingumfuziselo okanye elithambileyo likhonkco lokwenyani kwifayile yoqobo, kanti ikhonkco eliqinileyo yikopi yesipili yefayile yokuqala. Ukuba ucima ifayile yokuqala, ikhonkco elithambileyo alinalo ixabiso, kuba likhomba kwifayile engekhoyo.

If you delete the ‘my-hard-link’ of a hard link, the remaining files pointing to that same space (inode) in the hard drive will still contain the data stored on the hard drive.

Ikhonkco elilukhuni yikopi eyiyo yefayile eyalatha kuyo. Zombini ikhonkco elinzima kunye nefayile edibeneyo yabelana nge-inode efanayo. Ukuba ifayile yemvelaphi icinyiwe , ikhonkco elinzima lisasebenza kwaye uya kuba nakho ukufikelela kwifayile kude kube inani lamakhonkco anzima kwifayile ayi-0 (zero).

Ukwenza ikhonkco lokomfuziselo yi Linux sebenzisa i ln umyalelo ngo -s ukhetho. Ngolwazi oluthe vetshe malunga nomyalelo we-ln, ndwendwela i-ln man iphepha okanye chwetheza umntu ln kwi-terminal yakho. Ukuba unayo nayiphi na imibuzo okanye impendulo, zikhululeke ukushiya izimvo.

Ukuba ufumana iifayile ezimbini ezineempawu ezifanayo kodwa awuqinisekanga ukuba ziqhagamshelwe nzima, sebenzisa ls -i umyalelo ukujonga inombolo ye-inode. Iifayile ezidityaniswe nzima kunye zabelana ngenombolo ye-inode efanayo. Inombolo ye-inode ekwabelwana ngayo yi-2730074, oku kuthetha ukuba ezi fayile zidatha efanayo.

Ukwenza amakhonkco anzima kwi-Linux okanye kwi-Unix-efana nenkqubo:

  1. Yenza ikhonkco eliqinileyo phakathi kwefayile1 kunye nefayile yekhonkco, sebenzisa: ln sfile1file link1file.
  2. Ukwenza amakhonkco omfuziselo endaweni yamakhonkco aqinileyo, sebenzisa: ln -s ikhonkco lomthombo.
  3. Ukuqinisekisa amakhonkco athambileyo okanye aqinileyo kwiLinux, sebenzisa: ls -l ikhonkco lomthombo.

16 окт. Ngo-2018 г.

4 Answers. Show activity on this post. You can delete it with rm as usual: rm NameOfFile . Note that with hard links there is no distinction between “the original file” and “the link to the file”: you just have two names for the same file, and deleting just one of the names will not delete the other.

Kwinkqubo yakho yefayile yeLinux, ikhonkco ludibaniso phakathi kwegama lefayile kunye nedatha eyiyo kwidiski. Kukho iintlobo ezimbini eziphambili zekhonkco ezinokudalwa: izixhumanisi "ezinzima", kunye ne "soft" okanye izixhumanisi ezingokomfanekiso. … Ikhonkco lokomfuziselo yifayile ekhethekileyo ekhomba kwenye ifayile okanye uvimba weefayili, obizwa ngokuba yithagethi.

Ewe. Bobabini bathatha isithuba njengoko bobabini basenongeniso lolawulo.

You can check if a file is a symlink with [ -L file ] . Similarly, you can test if a file is a regular file with [ -f file ] , but in that case, the check is done after resolving symlinks. hardlinks are not a type of file, they are just different names for a file (of any type).

To remove a symbolic link, use either the rm or unlink command followed by the name of the symlink as an argument. When removing a symbolic link that points to a directory do not append a trailing slash to the symlink name. If you have any questions or feedback, feel free to leave a comment.

Hard links and symbolic links are two different methods to refer to a file in the hard drive. … A hard link is essentially a synced carbon copy of a file that refers directly to the inode of a file. Symbolic links on the other hand refer directly to the file which refers to the inode, a shortcut.

Ulawulo lwenkqubo kumphathi wefayile, luza kubonakala luqulathe iifayile ngaphakathi /mnt/partition/. inkqubo. Ukongeza "kwizixhumanisi ezingokomfanekiso", ezaziwa nangokuthi "iikhonkco ezithambileyo", unokudala "ikhonkco elinzima". Ikhonkco elingumfuziselo okanye elithambileyo likhomba indlela kwindlela yefayile.

Isizathu sokuba abalawuli abanxibelelanisa nzima bengavumelekanga bubuchule obuncinane. Ngokusisiseko, bophula ulwakhiwo lwenkqubo yefayile. Akufanele usebenzise amakhonkco anzima kunjalo. Amakhonkco emiqondiso avumela uninzi lomsebenzi ofanayo ngaphandle kokubangela iingxaki (umzekelo ln -s ikhonkco ekujoliswe kulo ).

Uyayithanda le post? Nceda wabelane nabahlobo bakho:
OS Namhlanje