search
HomeSystem TutorialLINUXVideo tutorial for learning PHP: The importance of file naming rules

The file name is to make it easier for people to distinguish different files in the computer, and to set a designated name for each file. It consists of the main name of the file and its extension.

文件名中不能包含的字符

The DOS operating system stipulates that the file name consists of the file main name and the extension name. The file main name consists of 1 to 8 characters. Illegal characters in the Linux file name . The extension name consists of 1 to 3 characters. The name and extension are separated by a small dot, often called the 8.3 rule. (Recommended learning: PHP video tutorial)

The format is as follows:

□□□□□□□□.□□□

Copy after login

For example: G9401.DBF, here G9401 is the main name of the linux scheduled task, and DBF is the extension name. The characters that can be used for the file main name and extension are:

(1) English letters: A—z (upper and lower case equivalent)

(2) Number: 0-9

(3) Chinese characters

(4) Special symbols: $#&@ ()-[]^~, etc.

(5) Various control characters and the following characters cannot be used in file names:

/|:"*?

Because those characters have been used for other purposes.

windows breaks through the restrictions of DOS on file naming rules and allows the use of long file namesIllegal characters in Linux file names. The main naming rules are as follows:

(1) The maximum length of the file name can be 255 characters.

(2) You can use an extension name. The extension name is used to indicate the file type. You can also use an extension name with multiple separators. For example, win.ini.txt is a legal file name, but its file type is determined by the last extension.

(3) Spaces are allowed in file names, but the following characters are not allowed (Chinese input method status): /|:"*?

(4) The windows system displays different cases of letters in file names, but does not distinguish between upper and lower case when using them.

The file name is an indication of the existence of the file, and the operating system controls and manages it according to the file name. Different operating systems have slightly different rules for file naming, that is, the format and thickness of the file name vary from system to system. Such as :UNIX/LINUX systems distinguish the case of file names, while some systems do not distinguish, such as: MS-DOS and WINDOWS.

The file extension is used to distinguish the attributes of the file. In some systems, it is not perceived by the system. For example: in UNIX/LINUX systems, there is no difference between the hello.c file and the helloc file for the system. Adding the extension .c is the same as not adding it. The system does not know what file it is. But after the user adds .c, it is easier for the user to understand that it is a C language source code file.

However, in MS-DOS and WINDOWS systems, file extensions are system-aware. In WINDOWS, different file extensions have their associated programs to open. This extension is not only such as txt, etc. Except for the original ones, the rest are usually registered in the system when installing the software. You can see its related information under the HKEY-CLASSES-ROOT root key in the registry.

If you change the file extension to one that is not recognized by the system, you will be prompted to select the program to open it when opening it. For example, if you change hello.txt to hello.123, you can also see that the icon has also changed, becoming Unknown. And for WORD files such as .doc format, because it was developed by MICROSOFT, it maintains good compatibility. When sensing, the system not only detects the extension name, but also detects the internal format mark of the file, so although .doc is Change it to other characters. In a system with WORD installed, the system can still associate it with WORD for opening.

The above is the detailed content of Video tutorial for learning PHP: The importance of file naming rules. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:ITcool. If there is any infringement, please contact admin@php.cn delete
Warehouse: A GUI for Effortlessly Handling Flatpak AppsWarehouse: A GUI for Effortlessly Handling Flatpak AppsMay 09, 2025 am 11:30 AM

A GUI for Effortless Flatpak Management: Introducing Warehouse Managing a growing collection of Flatpak applications can be cumbersome using only the command line. Enter Warehouse, a user-friendly graphical interface designed to streamline Flatpak a

8 Powerful Linux Commands to Identify Hard Drive Bottlenecks8 Powerful Linux Commands to Identify Hard Drive BottlenecksMay 09, 2025 am 11:03 AM

This article provides a comprehensive guide to identifying and resolving hard drive bottlenecks in Linux systems. Experienced server administrators will find this particularly useful. Slow disk operations can severely impact application performance,

4 Best QR Code Generators for Linux Users4 Best QR Code Generators for Linux UsersMay 09, 2025 am 10:27 AM

Efficient QR code generation tool under Linux system In today's digital world, QR codes have become a way to quickly and conveniently share information, simplifying data access from URLs, texts, contacts, Wi-Fi credentials, and even payment information. Linux users can use a variety of tools to create QR codes efficiently. Let's take a look at some popular QR code generators that can be used directly on Linux systems. QRencode QRencode is a lightweight command line tool for generating QR codes on Linux. It is well-received for its simplicity and efficiency and is popular with Linux users who prefer direct methods. Using QRencode, you can use the URL,

elementary OS 8: A User-Friendly Linux for macOS and Windowselementary OS 8: A User-Friendly Linux for macOS and WindowsMay 09, 2025 am 10:19 AM

Elementary OS 8 Circe: A Smooth and Stylish Linux Experience Elementary OS, a Ubuntu-based Linux distribution, has evolved from a simple theme pack into a fully-fledged, independent operating system. Known for its user-friendly interface, elegant de

40  Linux Commands for Every Machine Learning Engineer40 Linux Commands for Every Machine Learning EngineerMay 09, 2025 am 10:06 AM

Mastering Linux is crucial for any machine learning (ML) engineer. Its command-line interface offers unparalleled flexibility and control, streamlining workflows and boosting productivity. This article outlines essential Linux commands, explained fo

Arch Linux Cheat Sheet: Essential Commands for BeginnersArch Linux Cheat Sheet: Essential Commands for BeginnersMay 09, 2025 am 09:54 AM

Arch Linux: A Beginner's Command-Line Cheat Sheet Arch Linux offers unparalleled control but can feel daunting for newcomers. This cheat sheet provides essential commands to confidently manage your system. System Information & Updates These com

How to Install Scikit-learn for Machine Learning on LinuxHow to Install Scikit-learn for Machine Learning on LinuxMay 09, 2025 am 09:53 AM

This guide provides a comprehensive walkthrough of installing and using the Scikit-learn machine learning library on Linux systems. Scikit-learn (sklearn) is a powerful, open-source Python library offering a wide array of tools for various machine l

How to Install Kali Linux Tools in UbuntuHow to Install Kali Linux Tools in UbuntuMay 09, 2025 am 09:46 AM

This guide explains how to leverage Docker for accessing Kali Linux tools, a safer and more efficient alternative to outdated methods like Katoolin. Katoolin is no longer actively maintained and may cause compatibility problems on modern systems. Do

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version