檔案系統只是一堆資料夾嗎?(檔案系統說明)

從表面上看,作業系統的檔案系統可能看起來像一大堆資料夾,但肯定還有更多的資料夾。請繼續閱讀,我們將調查檔案系統表面下的內容。...
007Ys3FFgy1gpged8wdw9j30i207st9u

從表面上看,作業系統的檔案系統可能看起來像一大堆資料夾,但肯定還有更多的資料夾。請繼續閱讀,我們將調查檔案系統表面下的內容。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

問題

超級使用者讀者P\u Q對檔案系統很好奇,他寫道:

I have used Windows since childhood, and when I hear the phrase “Windows files system” I think of directories (folders) within directories, a folder called SYSTEM, a folder called PROGRAM FILES, etc. Is this what the system is? Just the layout of the folders?

And then I recently started using Linux, and my reference book says in the Linux filesystem everything starts at root and branches off from there. How is that really different from Windows? I mean, it seems the Linux system and the Windows system are just two ways of setting up a directory tree. Is this what file system means?

這種簡單的檔案系統描述方式是最準確的嗎?讓我們再深入一點。

答案

超級使用者貢獻者tomwij**an對Windows和Linux作業系統中的檔案系統結構進行了深入的研究。他寫道:

Just the layout of the folders?

Sounds too good to be true…

Let’s take the FAT32 file system as an example. I can install Windows XP on it, but I can also use it on a memory card. On a memory card, you don’t have those folders that you sum up.

So… Don’t confuse the directory layout of a family of operating systems with a file system.

Is this what a file system means?

No… It refers to the underlying bits and bytes that make your directory structure work.

The underlying bits and bytes? Show me FAT32!

Let’s look at what FAT32 looks like, it has:

  • Some header sectors in the beginning, like Volume ID and Reserved Sectors
  • Two File Allocation Tables, allowing us to figure out where our files are.
  • Clusters containing all our directory and file data.
  • Some very **all unused space that we can’t use.

A FAT table c***ists of a lot of entries that look like this, allowing us to determine where the directory or file is stored in the clusters space, as well as some attributes and size.

A directory entry would point to a list of directory/file entries…

In the clusters space, we can now travel our clusters to find the data we need. A cluster essentially contains data and information where the next fragments are

Do other file systems differ? Show me NTFS!

I’m going to show you an image so you can notice the differences, the rest is homework for the reader: More information can be found on this blog archive or Google.

The main idea is that NTFS is a huge improvement over FAT32 that is more robust/efficient. Having a better idea of (un)used space by using a bitmap to further help against fragmentation. And so on…

007Ys3FFgy1gpged9refhj30d90a00t8

What about the file systems on Linux? Show me ext2/3!

The idea is that ext2/ext3 use super blocks and inodes; this allows for soft and hardlinks, directories that are files, files with multiple names and so on. The main gist is abstracting away to allow the file system to be capable of doing more meta-ish stuff…

007Ys3FFgy1gpgeday955j30fw0b3aax

有關檔案系統的更多閱讀,請參閱以下How to Geek文章:

  • HTG解釋:Linux目錄結構解釋
  • HTG解釋說:您應該選擇哪個Linux檔案系統?
  • 我的USB驅動器應該使用什麼檔案系統?

 


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-12 03:07
  • 閱讀 ( 33 )
  • 分類:網際網路

你可能感興趣的文章

根資源管理器讓你深入android的檔案系統

根資源管理器是檢視和編輯**系統檔案的最佳應用程式。你要花4美元,但絕對值得。它的下載量超過50萬次,在Play商店的星級為4.7。 ...

  • 發佈於 2021-03-16 05:29
  • 閲讀 ( 52 )

如何在linux中查詢目錄

在Linux檔案系統中查詢特定目錄?幸運的是,您可以使用許多搜尋工具。我們將研究幾個易於使用的選項,以及如何使用它們高效地搜尋資料夾。 ...

  • 發佈於 2021-03-28 04:10
  • 閲讀 ( 46 )

如何將linux主目錄移動到另一個驅動器

...資料夾意味著您可以重新安裝Linux,而不必擔心您的個人檔案。 為什麼把你的主資料夾分開? 如果要設定新計算機或將硬碟驅動器新增到現有計算機,則可能需要將主目錄放在不同於預設位置的驅動器上。 現代個人電腦越來...

  • 發佈於 2021-04-03 02:48
  • 閲讀 ( 50 )

如何從linux終端裝載和解除安裝儲存裝置

Linux和Unix作業系統(如macOS)中的檔案系統可以使用終端安裝、解除安裝和重新安裝。這是一個強大和多功能的工具這裡的一切你需要知道。 linux檔案系統 Linux、macOS和其他類似Unix的作業系統中的檔案系統不像Windows那樣為儲存...

  • 發佈於 2021-04-03 13:37
  • 閲讀 ( 50 )

如何從linux終端檢視可用磁碟空間和磁碟使用情況

...用命令。要找出可用和已用的磁碟空間,請使用df(磁碟檔案系統,有時稱為磁碟空閒)。要發現佔用已用磁碟空間的內容,請使用du(disk usage)。 在Bash終端視窗中鍵入df並按enter開始。您將看到許多與下面的螢幕截圖類似的輸...

  • 發佈於 2021-04-03 17:35
  • 閲讀 ( 44 )

如何在Windows10上啟用區分大小寫的檔名和資料夾名

windows10現在提供了一個可選的區分大小寫的檔案系統,就像Linux和其他類似UNIX的作業系統一樣。如果啟用此功能,所有Windows程序都將正確處理區分大小寫的檔案和資料夾。換句話說,他們將“file”和“file”視為兩個獨立的檔...

  • 發佈於 2021-04-05 22:44
  • 閲讀 ( 42 )

如何在windows中訪問ubuntu bash檔案(以及bash中的windows系統驅動器)

從商店安裝的Linux環境(比如Ubuntu和openSUSE)將它們的檔案儲存在一個隱藏的資料夾中。您可以訪問此資料夾來備份和檢視檔案。您還可以從bashshell訪問Windows檔案。 更新:從Windows10 2019年5月的更新開始,現在有了一種從Windows應...

  • 發佈於 2021-04-06 16:05
  • 閲讀 ( 47 )

apfs、mac os extended(hfs+)和exfat之間有什麼區別?

因此,當您看到一個潛在的檔案系統選擇時,您正在使用磁碟實用程式對新硬碟進行分割槽。這個列表比你想象的要長,有“APFS(區分大小寫)”和“macos Extended(Journaled,Encrypted)”這樣的術語可供選擇。 這一切意味著什麼...

  • 發佈於 2021-04-07 03:31
  • 閲讀 ( 94 )

apfs解釋道:你需要了解蘋果新的檔案系統嗎

...macOS 10.13 High Sierra帶來了一個名為“Apple file system”的新檔案系統,它在很大程度上取代了舊的HFS+檔案系統。蘋果檔案系統,也被稱為APFS,從ios10.3開始,iphone和ipad上就預設使用了它,蘋果手錶和蘋果電視上也使用了它,但現在...

  • 發佈於 2021-04-07 05:02
  • 閲讀 ( 70 )

我的usb驅動器應該使用什麼檔案系統?

...困難的。你怎麼知道你的Mac、Xbox和Windows PC可以讀取你的檔案?繼續閱讀,找到您的完美USB驅動器解決方案。 如果您想與大多數裝置共享您的檔案,並且沒有一個檔案大於4 GB,請選擇FAT32。 如果您有大於4 GB的檔案,但仍然希...

  • 發佈於 2021-04-07 13:30
  • 閲讀 ( 54 )
E43811412388
E43811412388

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦