本文章更新于 2017.11.12,如果本節(jié)更新內容與下面小節(jié)的內容不一致,以這個小節(jié)為準。
As the saying goes, a picture is worth a thousand words. Here is how I visualize it:
If%20you%20don’t%20know%20what%20inode%20is,%20please%20refer%20to%20wikipedia%20page%20about%20it.%20The%20picture%20above%20tells%20us%20a%20hard%20link%20just%20creates%20another%20file%20with%20a%20link%20to%20the%20same%20underlying%20inode.%20Therefore,%20if%20you%20want%20to%20delete%20the%20inode,%20then%20you%20have%20to%20delete%20all%20the%20links%20to%20it.%20For%20a%20soft%20link,%20if%20you%20delete%20or%20rename%20myfile.txt%20will%20invalidate%20it%20and%20cause%20it%20can’t%20find%20inode.%20Let%20me%20show%20you%20an%20example.%20You%20will%20understand%20it%20deeply.
I created a directory named lnte in my Ubuntu os and printed its apparent sizes in byte by typing following command:
du -b lnte
And you would see that it take up 4096 bytes. As shown in the picture below, you may find that a hard link doesn’t occupy any space on disk whereas a soft link indeed consumes 5-bytes space.
首先,我在我的target目錄下創(chuàng)建了文件lovedog.txt,并寫了一行文字,如下圖:
當我們去target目錄中看lovedog.txt文件時,內容也發(fā)生了變化。同樣的道理,我可以創(chuàng)建很多個軟鏈接指向lovedog.txt,如下圖:
該控件有很多自己的屬性,而串口只能做異步訪問,只是在windows%209x下磁盤文件只能做同步訪問,串口和磁盤文件可以統(tǒng)一的方式來簡單讀寫。-l%20如果指定了%20-r%20或%20-r%20選項,并且引用文件類型目錄的符號鏈接在命令行上指定或在文件層次結構轉移過程中遇到linux命令大全,則%20grep將搜索符號鏈接所引用的目錄文件以及文件層次結構中在它以下的所有文件。讓您理解文件系統(tǒng)的作用,能夠區(qū)分ext3,ext4,xfs有何不同并學習將硬盤設備分區(qū)、格式化以及掛載等常用硬盤管理操作,完整配置swap交換分區(qū)、quota服務限制磁盤配額、ln命令創(chuàng)建軟/硬鏈接、管理raid磁盤冗余陣列(0、1、5和10模式)、lvm邏輯卷管理器并能夠熟練掌握創(chuàng)建軟/硬鏈接的方法,學習了解vfs原理。
我們可以通過下圖的命令來創(chuàng)建硬鏈接: