怎么看一堆文件夹的文件_文件系统只是一堆文件夹吗? (文件系统说明)

怎么看一堆文件夹的文件

怎么看一堆文件夹的文件

image
()

On the surface your operating system’s file system might just look like a big pile of folders, but surely there is more to it than that. Read on as we investigate what lies beneath the surface of the file system.

从表面上看,操作系统的文件系统可能看起来像一大堆文件夹,但是肯定有更多的文件夹。 在我们研究文件系统表面之下的内容时,请继续阅读。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

问题 (The Question)

SuperUser reader P_Q is curious about file systems, he writes:

超级用户阅读器P_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?

我从小就开始使用Windows,当我听到“ Windows文件系统”一词时,我想到目录中的目录(文件夹),一个名为SYSTEM的文件夹,一个名为PROGRAM FILES的文件夹等。这是系统吗? 只是文件夹的布局?

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?

然后我最近开始使用Linux,我的参考书说在Linux文件系统中,一切都始于根,然后从那里分支。 与Windows有何真正的不同? 我的意思是,看来Linux系统和Windows系统只是设置目录树的两种方式。 这是文件系统意味着什么?

Is this simple take on the file system the most accurate way of describing it? Let’s dig a little deeper.

这种对文件系统的简单描述是最准确的描述方式吗? 让我们深入一点。

答案 (The Answer)

SuperUser contributor Tom Wijsman offers an insightful look at the structure of file systems both within Windows and Linux operating systems. He writes:

超级用户贡献者Tom Wijsman对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.

让我们以FAT32文件系统为例。 我可以在其上安装Windows XP,但也可以在存储卡上使用它。 在存储卡上,没有汇总的文件夹。

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!

基础位和字节? 给我看看FAT32!

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

让我们看一下FAT32的外观,它具有:

  • Some header sectors in the beginning, like Volume ID and Reserved Sectors

    开始时有一些标头扇区,例如卷ID和保留扇区
  • Two File Allocation Tables, allowing us to figure out where our files are.

    两个文件分配表,使我们能够确定文件的位置。
  • Clusters containing all our directory and file data.

    包含我们所有目录和文件数据的集群。
  • Some very small unused space that we can’t use.

    一些我们无法使用的非常小的未使用空间。

A FAT table consists 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.

FAT表由许多如下所示的条目组成,使我们能够确定目录或文件在群集空间中的存储位置以及一些属性和大小。

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!

其他文件系统是否有所不同? 告诉我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.

我将向您展示一张图片,以便您可以注意到它们之间的差异,其余的内容供读者阅读:可以在此博客存档或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…

主要思想是NTFS是对FAT32的巨大改进,它更加健壮/高效。 通过使用位图进一步帮助防止碎片,更好地了解(未使用的)空间。 等等…

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

Linux上的文件系统呢? 告诉我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…

这个想法是ext2 / ext3使用超级块和inode。 这样就可以实现软链接和硬链接,作为文件的目录,具有多个名称的文件等等。 主要要点正在抽象化,以使文件系统能够执行更多的元操作。

For more reading on file systems, make sure to check out the following How-To Geek articles:

有关文件系统的更多信息,请确保查看以下How-To Geek文章:



Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不对。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/132492/is-a-file-system-just-a-bunch-of-folders/

怎么看一堆文件夹的文件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值