Linux file organization, chaotic order

Source: Internet
Author: User

In linux, everything is regarded as a file, whether it is a directory or a device. Therefore, if you want to be familiar with Linux, you need to understand the nature and organizational structure of files.

Have a certain understanding. In Linux, files are organized into byte streams, which facilitates data flow and transmission.

For byte streams, we can understand the concept in C ++. The essence of C ++'s standard input/output iostream and file stream fstream is byte streams.

Linux Files can only be described in disorder at first glance. Among them, the most worrying thing is that the installation of programs in linux is not like that in windows.

In this way, you can give a folder, and even specify a path in vain.
However, it is often difficult to clean the files during uninstallation.

Especially when the source code package is installed, there is no uninstallation command (at least I am not Baidu ).

In fact, as long as you get down to it and take some time to understand the organizational structure of these files, you will find chaos and self-order.

In Linux, many directories are characterized by "static", which is not involved in the use of common users.

The following lists the features of these features. Their functions are dedicated by default and do not change frequently.

 

 

Several other directories are the key directories involved in Linux, so I have to have a deep understanding of them.

It is necessary to set
/Sbin,/usr/sbin,/bin, and/usr/bin are three light policies.

It is very difficult to use bash. Linux makes your work easier and your philosophy cannot be implemented.

The installation path of the application cannot be avoided in any way? Don't worry. Try the following operations.

# Display
The location of the executable file (display the location of the executable file)
$WhichSoftware_name
$
WhereisSoftware_name
# Display software-relatedAll filesLocation
$LocateSoftware_name

As you can see, bash basically gives the location in several directories.

After the software is installed, its related files will be scattered in many default directories of the system. The executable files of the program are generally stored in

In the/usr/bin directory, you only need to delete this file, even if it is unmounted. For other files, use locate to locate and manually delete them,

Of course, the speed depends on the degree of command play. (I only know this stupid method, but I don't know if there is a simple method to completely uninstall it ?)

During Development in Linux, almost only
/Usr
. The/usr directory is quite large, with system command files, various library files, and updated

Almost all source file packages are in this directory, and they also change frequently. In fact, for C/C ++ programming, the header files and library files involved are only in this directory.

 

 

Therefore, the file structure in Linux is not as complicated as you can see. For common users, it is enough to familiarize themselves with the/usr Directory, which is not only available in Linux.

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.