文件系统只是一堆文件夹吗?(文件系统说明)

从表面上看,操作系统的文件系统可能看起来像一大堆文件夹,但肯定还有更多的文件夹。请继续阅读,我们将调查文件系统表面下的内容。...
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
  • 阅读 ( 219 )
  • 分类:互联网

你可能感兴趣的文章

在每次windows 10更新或安装之前执行此操作

...,以及您不需要担心的文件。至少,备份您的文档和下载文件夹,以及您可能拥有的任何与媒体相关的文件(如音乐、视频等)。将它们存储在外部驱动器上,或者更好地存储在NAS设备上。在我们的数据备份基础概述中了解更多...

  • 发布于 2021-03-12 17:08
  • 阅读 ( 222 )

适用于windows 10的10个最佳图标包

...安装了图标,您可能需要手动更改它们。为此,右键单击文件夹或文件,然后转到“属性”>“自定义”。接下来,导航到“文件夹图标”>“更改图标”,然后使用“浏览”按钮转到保存图标的位置。 ...

  • 发布于 2021-03-13 13:09
  • 阅读 ( 789 )

如何在linux上安装软件:软件包格式说明

...。但有时你想要的并不存在。偶尔你会从网站上下载一个文件,然后像点击WindowsEXE一样点击它。只是有个问题。就像没有单一版本的Linux一样,也没有一种通用的Linux包格式(尽管有些人正在尝试改变这种格式)。 ...

  • 发布于 2021-03-17 09:44
  • 阅读 ( 397 )

如何修复windows update错误0x80070057

... 重命名softwaredistribution文件夹 ...

  • 发布于 2021-03-17 19:13
  • 阅读 ( 354 )

mac磁盘权限说明:如何修复macos权限

... Mac上的每个项目,无论是文件还是文件夹,都带有一组权限。这些控件控制哪些用户帐户可以访问它以及它们具有何种访问权限。权限由三种类型的用户(所有者、组和所有人)执行的三个活动(读、写和...

  • 发布于 2021-03-20 05:34
  • 阅读 ( 1051 )

linux下如何重命名文件

... 如果你有一个学期的笔记或文件夹充满假期照片,重命名文件一次一个将需要一整天。幸运的是,你不必这样做,你甚至不需要安装额外的软件,使工作更容易。 ...

  • 发布于 2021-03-22 02:48
  • 阅读 ( 268 )

想从勒索软件中活下来吗?下面是如何保护你的电脑

...提炼成恶意软件的恶意、贪婪和随意的无能。它加密你的文件,并要求支付一个密钥,甚至可能无法工作。但是有了正确的备份策略,您的文件可以在感染后存活。 我们建议你今天就这样做,避免争论你是否应该支付赎金。 ...

  • 发布于 2021-04-03 05:51
  • 阅读 ( 186 )

什么是固件或微码,如何更新硬件?

...执行“固件更新”,或从**商处下载并安装新的“固件”文件。 一个操作系统似乎应该只是软件,所以这看起来可能有点不一致。但这是因为固件不是一个精确的术语。虽然软件和硬件相当清楚,但固件只是一种低级软件。 什...

  • 发布于 2021-04-06 14:28
  • 阅读 ( 197 )

在windows中隐藏或密码保护文件夹的最佳方法

...有你不想让别人看到的文件吗?或者他们只是把你的文档文件夹弄得乱七八糟,你想把它们藏起来?这里有几种不同的方法来隐藏您的文件,以及何时您可能需要使用它们。 编者按:这篇文章最初发表于2014年,曾包含声称无需...

  • 发布于 2021-04-08 05:59
  • 阅读 ( 168 )

删除windows磁盘清理中的所有内容安全吗?

...的所有其他内容 相关:如何在Windows7或Windows8上减小WinSXS文件夹的大小 那么其他所有的选择都有什么用呢?我们进行了磁盘清理并列出了一个清单。请注意,我们在运行Windows10并安装周年更新的PC上使用了磁盘清理。旧版本的Wind...

  • 发布于 2021-04-09 08:15
  • 阅读 ( 204 )
E43811412388
E43811412388

0 篇文章

相关推荐