How Does The Linux File System Work?
2007-08-25 11:25
543 查看
LINUX FILES
How Does The Linux File System Work?
<script type="text/javascript">google_ad_client = "pub-7117478858858656";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "text";</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>When Linux is installed, a file system is carved out a chunk of hard disk and formatted it so that Linux can use it. A hierarchical (treelike) structure for storing files imposes some order on the file system to help both you and the Linux find needed files.
In this section, you'll learn how to work with files and directories in a Linux system. You'll understand how the file system is structured to separate system data from personal data and how to navigate through it. We'll cover two ways to manipulate your files: using the command line and the Midnight Commander.
When you're done, you'll be creating, deleting, copying, renaming, listing, linking, and protecting your files like a pro. You'll also learn the Nine Deadly Keystrokes--or how to wipe out the entire file system without really trying. (But don't worry; this command can affect you only if you're logged in as root.)
Log in as hermie and try the examples in this section as you read through it. You'll find that the Linux file system is a lot like DOS, only more robust and flexible.
What Is a Linux File?
We've created a structured file system and filled it with a whole bunch of files--without knowing what Linux files are. Here's what files are in the Linux world and how they are named.
Types of Files
In most operating systems, a file is simply a blob of data stored on disk with a unique name. A file could be a list of names and numbers, a cheesecake recipe, or an executable program. But under Linux, everything is a file. In addition to data and executable files, Linux treats directories and even the various components of your computer as files.
This means there are files that represent your keyboard, console, printer, CD-ROM, and even your system's RAM. These special files are called devices, and they are found in the /dev directory (see Figure 4-1). (If you look in this directory later, you'll see files such as /dev/fd0 (a floppy drive), /dev/tty1 (a console), and others you may be able to identify by their names.) When Linux (or any Unix program) needs to talk to a physical hardware device, it does so by simply reading from or writing to one of these special files.
Previous Lesson: Help!
Next Lesson: Linux File Names
相关文章推荐
- [POST] What Is the Linux fstab File, and How Does It Work?
- linux c语言 rename的用法-rename() does not work across different mount points, even if the same file system is mounted on both
- How to programmatically clear the filesystem memory cache in C++ on a Linux system?
- maven构建 出错:cannot be resolved to absolute file path because it does not reside in the file system
- linux虚拟机上中挂载光驱报错 mount:youmustspecifythefilesystemtype
- linux下安装PHP的CI框架,出现Your view folder path does not appear to be set correctly. Please open the following file and correct this: i
- How does CCFileUTils::fullPathForFilename work
- linux中挂载硬盘报错(you must specify the filesystem type)
- 虚拟机linux挂载光盘显示:mount: you must specify the filesystem type
- Linux 挂载光盘:mount: you must specify the filesystem
- How to change the default run level of a RedHat 9.0 or Fedora Core Linux system
- The Loopback Root Filesystem HOWTO
- The Google File System : part8 RELATED WORK and CONCLUSIONS and ACKNOWLEDGMENTS
- How does HTTP file upload work?
- Using the Oracle ASM Cluster File System (Oracle ACFS) on Linux, Part Three
- 虚拟机linux挂载光盘显示:mount: you must specify the filesystem type
- How does the Three-state workflow work?三态工作流
- cannot be resolved to absolute file path because it does not reside in the file system
- General overview of the Linux file system
- How does the METHOD_OPT parameter work —— Method_opt 参数应用