Small white learn Linux (iii)--File system basic structure

Source: Internet
Author: User
Tags system log touch command

The Linux file system is an inverted single-tree structure with file names that are strictly case-sensitive (Windows systems are case-insensitive). The path is separated by "/" and differs from Windows ' \ '.

Here I draw a normal directory structure diagram of a general Linux system:

A single point is the top-level directory "/", and the following are the approximate functions of each directory:

Bin: Saves the commonly used executable binaries (commands). Under the Sbin folder, only hyper-polar users (root) can execute boot: Boot directory and boot file.   Contains the kernel file Vmlinuz the beginning of the file. Dev: Device catalog, all hardware devices for the computer.   All hardware is abstracted as one file.   ETC: Configuration files for almost all operating systems.   Home: Home directory, document data for all users lib: the library file that the program runs. Opt: Install large software (such as Oracle), is not mandatory proc: system Real-time information (the folder does not exist in the hard disk, only in memory, is a virtual folder) SYS: The system's underlying hardware information tmp: Temp directory, automatically delete usr every few days: application software Installation directory (default installation directory) var: Save frequently changing information (such as System log information)

For Linux systems, each system process (shell) has a current working directory, which means that each process is relative to a working directory. The PWD command displays the current working directory.

Linux, files and folders are not different, the name is case sensitive up to 255 characters, the forward slash is not a valid character (because he is a path separator), with the touch command can create a blank file or update the time of the existing file.

Here are some basic file system commands:

ls command

LS lists the contents of the current directory (you can also ls/usr this directory, the default is not the current directory) ls-a display all the files in the current directory (including hidden files (usually a profile)) Ls-l Show Details ls-r recursive display subdirectory structure Ls-ld displaying directory and link information the file command to view the files type CD command to switch directoriesTop level directory:.   Current directory:. User home directory: ~ Previous working directory:-Any directory under the CD return to the home directory file operation:Create: mkdir Create folder Touch create empty file or update file time Delete: RmDir Delete Empty foldersRM Delete File parameter:-I interactive (prompt confirmation for each deleted file)-R recursive Delete Non-empty folderUnder all Content-F Force Delete, no warning prompt replication: CP source file target file-r recursively copy entire directory tree (folder copy)-V Show details move: M V is basically the same as the CP operation. If you do not specify a file name, the equivalent is cut, and the specified name is cut and renamed. You can use this to rename the file.

Small white learn Linux (iii)--File system basic structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.