Differences between Unix file names and Windows file names (1)

Source: Internet
Author: User

The naming rules for files in Unix are not as strict as those in Windows. In other words, the characters that cannot be contained in file names in many Windows operating systems can be used in Unix operating systems. Therefore, some administrators who transfer data from the Windows operating system will feel particularly uncomfortable. Today, I will summarize the differences between the naming rules of the two operating systems to help the Windows System Administrator migrate to the Unix operating system more smoothly.

1. The representation of hidden files is different.

In Windows, if you want to hide the properties of a file, you must right-click the file and choose hide ". Then you can hide the file. In general, users cannot see hidden files. However, the Unix operating system is different. In a Unix operating system, a folder or file can be hidden like a Windows operating system. However, the two methods are different. In a Unix operating system, it is controlled based on the name of a file or folder (directory file. That is, to hide a file, you only need to add an English dot at the beginning of the file name. If you want to hide a directory file, you only need to set the dot before the name of the directory file in the previous English state. Such as. Unix. This indicates that the folder is a hidden file or a hidden folder.

How can I view this hidden file or folder? This is different from the Windows operating system. In a Unix operating system, if you want to enter a hidden folder, you do not need to set it as special as in a Windows operating system. You only need to enter the full file name or directory file name. That is to say, we need to include the. Number. To enter the UNIX hidden folder set above, you only need to execute the cd. UNIX Command. Therefore, in Unix operating systems, whether it is to set hidden files, hide directory files, or view these files, it is controlled by a point number in the English state. Therefore, the importance of this point number should be fully recognized in Unix operating systems.

2. The case sensitivity is different.

In Windows, both files and folders are case insensitive. That is to say, Unix and UNIX are the same file or folder. In Windows, you do not need to consider the case sensitivity issue when naming folders or directories. This makes operations very convenient. For example, you do not need to consider case sensitivity when defining environment variables. It is okay to write all the paths in lower case or upper case. But it is different in Unix operating systems. In Unix operating systems, both common files and directory files are case sensitive. Unix and UNIX are two different files or directories. Although this difference is not great, the impact is far-reaching. For example, when defining environment variables in Unix, the input path cannot be case-insensitive. If the input of a character is case-insensitive, the environment variable does not work because it points to an incorrect position.

Therefore, pay special attention to the definition of a file or file name in a Unix operating system. In general, unless necessary, it is best to Use lowercase characters for common files. For system files or directories, use characters in size. No matter which type of file, there is a taboo that you should not use a mix of upper and lower cases to name the file or directory. On the one hand, it will be very troublesome to enter a directory or file with a mix of upper and lower cases. Second, it is prone to errors when referencing a path. Therefore, it is recommended that all files (common files, directory files, and Device Files) be in uppercase or lowercase. In addition, when defining environment variables, it is best to specify the path for the environment variables by copying and pasting them to prevent the environment variables from being ineffective due to incorrect case input.

When it comes to this case, it is best to remind you by the way. When defining an environment variable, the variable name is case sensitive. In Windows, environment variables are case-insensitive. You can enter the names of environment variables in the same size or lower case. However, in Unix operating systems, the environment variable is case sensitive. According to habits, environment variables in Unix are generally defined as uppercase. The common variable is set to lowercase. Although this is an unwritten rule, it is better for System Engineers to abide by it. To reduce the troubles caused by Case sensitivity.


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.