Linux File System brief intro
2016-05-25 10:20
519 查看
What is a File?
File are collection of data items stored on disk. Or, it’s device which can store the information, data, music (mp3 files), picture, movie, sound, book etc. In fact what ever you store in computer it must be inform of file. Files are always associated withdevices like hard disk ,floppy disk etc. File is the last object in your file system tree. See Linux/UNIX
– rules for naming file and directory names.
What is a directory?
Directory is group of files. Directory is divided into two types:Root directory – Strictly speaking, there is only one root directory in your system, which is denoted by / (forward slash). It is root of your entire file system and can not be renamed or deleted.
Sub directory – Directory under root (/) directory is subdirectory which can be created, renamed by the user.
Directories are used to organize your data files, programs more efficiently.
Linux supports numerous file system types
Ext2: This is like UNIX file system. It has the concepts of blocks, inodes and directories.Ext3: It is ext2 filesystem enhanced with journalling capabilities. Journalling allows fast file system recovery. Supports POSIX ACL (Access Control Lists).
Isofs (iso9660): Used by CDROM file system.
Sysfs: It is a ram-based filesystem initially based on ramfs. It is use to exporting kernel objects so that end user can use it easily.
Procfs: The proc file system acts as an interface to internal data structures in the kernel. It can be used to obtain information about the system and to change certain kernel parameters at runtime using
sysctl command. For example you can find out cpuinfo with following command:
# cat /proc/cpuinfo
Or you can enable or disable routing/forwarding of IP packets between interfaces with following command:
# cat /proc/sys/net/ipv4/ip_forward # echo "1" > /proc/sys/net/ipv4/ip_forward # echo "0" > /proc/sys/net/ipv4/ip_forward
NFS: Network file system allows many users or systems to share the same files by using a client/server methodology. NFS allows sharing all of the above file system.
Linux also supports Microsoft NTFS, vfat, and many other file systems. See Linux kernel source tree Documentation/filesystem directory for list of all supported filesystem.
You can find out what type of file systems currently mounted with mount command:
$ mount
OR
$ cat /proc/mounts
What is a UNIX/Linux File system?
A UNIX file system is a collection of files and directories stored. Each file system is stored in a separate whole disk partition. The following are a few of the file system:/ – Special file system that incorporates the files under several directories including /dev, /sbin, /tmp etc
/usr – Stores application programs
/var – Stores log files, mails and other data
/tmp – Stores temporary files
See The importance of Linux partitions for more information.
But what is in a File system?
Again file system divided into two categories:User data – stores actual data contained in files
Metadata – stores file system structural information such as superblock, inodes, directories
相关文章推荐
- 在线LDD3[linux device driver]
- Linux设置时间同步
- Linux下安装部署Jboss
- linux硬件设备操作函数 open(/dev/ietctl, O_RDWR|...)
- 网易视频云技术分享:linux软raid的bitmap分析
- Linux下NTP服务器配置
- linux内核模块签名(译)
- Linux之vi编辑器
- 宏内核与微内核、Linux内核与Unix内核的区别
- Linux命令之dos2unix - 将DOS格式文本文件转换成UNIX格式
- Linux中使用team方法绑定网卡
- 【Linux C/C++】 第02讲 HelloWorld程序编译流程详解
- Linux file system superblock
- linux下QtCreator工程文件中配置Wl,rpath参数
- linux添加开机自动启动程序
- linux nano 编辑器的 使用
- linux时间的查看与修改
- CentOS两台服务器利用scp拷贝文件
- linux系统/var/log目录下的信息详解
- Linux: vi 编辑器中文乱码