Table of Contents
The operating system distinguishes file types based on what the file is
Home Common Problem The operating system distinguishes file types based on what is in the file

The operating system distinguishes file types based on what is in the file

Jul 22, 2022 pm 02:06 PM
operating system

The operating system distinguishes file types based on the "extension" of the file; the file extension is a mechanism used by the operating system to mark the file type. The more important role of the extension is to let the system decide which file type to use. Which software should the user use to open this file?

The operating system distinguishes file types based on what is in the file

The operating environment of this tutorial: Windows 10 system, DELL G3 computer.

The operating system distinguishes file types based on what the file is

The operating system distinguishes file types based on the "extension" of the file

A mechanism used by the operating system to mark file types

The file extension (Filename Extension, or extended file name, suffix name) is an early operating system (such as VMS/CP/ M/DOS, etc.) is a mechanism used to mark file formats.

In a file name like "example.txt", example is the file main name, txt is the file extension, indicating that the file is a plain text file, and the period "." is the file main name and file extension. Name delimiter.

The more important role of the file extension is to let the system decide which software to use when the user wants to open the file.

The operating system distinguishes file types based on what is in the file

Main purpose introduction

Protection is important File

For some files (such as DOC, etc.), we do not want others to open them at will. The simplest protection method is to change its extension to another name, such as changing the ".xls" extension to ".cqq", etc. In this way, when you double-click the ".cqq" file, it cannot be opened directly, allowing Others mistakenly thought it was a document of unknown origin and gave up their interest in it. When we run it, we only need to adjust the association status to open it smoothly. For example, you can use Notepad to edit a batch file whose contents include the lines "assoc .xls= Excel.Sheet.8" "ping 127.0.1 –n 10" "assoc .xls=cqq". Then save it as an "open.bat" file. The batch process is simple. The first line uses the "assoc" command to set the correct association for the ".XLS" file. If you want to view the association of files of a specified type, you can execute the "assoc .xxx" command in the CMD window, where "xxx" represents the specific file extension.

The second line uses the Ping command to detect the local IP. The "-n" parameter specifies the number of detections. Generally speaking, one detection takes about 1 second. It takes 10 seconds to detect 10 times here. Of course, you can It depends on the actual situation. Note that "127.0.1" here also represents the local address, which is equivalent to "127.0.0.1". The third line re-associates the ".xls" type to our custom type. First modify the extension of the file that needs to be protected, for example, rename "wendang.xls" to "wendang.cqq". In this way, others cannot open it directly. When we need to use it, we can run the "open.bat" file and double-click the "wendang.cqq" file within the specified time interval to open it smoothly. The batch process will then automatically modify the file association status to prevent others from manipulating the file at will.

Of course, for security reasons, it is best to create a new account in the system (such as "gly", etc.) and set a complex password for it. Store the batch file in the NTFS partition, click the "Add" button in the "Security" panel in its properties window, add the "gly" account, and click the "Delete" button to delete the "Group or User Name" other groups and accounts in the column. If some accounts cannot be deleted, you can click the "Advanced" button, cancel "Inherit from parent those permission items that can be applied to child objects" in the "Permissions" panel in the pop-up window, and click the "Delete" button in the pop-up dialog box , you can clear all accounts. Select the "gly" account and check the "Full Control" item in the permission list, so that only the "gyl" account can operate the batch file.

For general extensions, we can clearly know the file type, but for uncommon extensions or files without extensions, it is not that simple to identify their true identity. Using the small tool FileTypeID, the problem can be easily solved. FileTypeID can identify thousands of file types. Run the program, drag and drop files of unknown types directly into the main interface of the program, and click the "Details" button to display the detailed information of the file, as shown in Figure 1. Click the "Analyze" button, and the file type to which the file may belong is displayed in the "Extension" column in the identification list, the probability of matching the file type is displayed in the "Match" column, and the file type is displayed in the "Type" column. Type description information. Based on this information, it is not difficult to discover its true identity.

In addition, when encountering files of unknown types, you can also use search engines such as Baidu to find the corresponding information. In Windows 8, the processing method is much simpler. After double-clicking a file of unknown type, click "More Options" in the pop-up panel to display all programs in the system that can process the file. After selecting the target program, check the item "Open all XXX files with this application", then you can use the program to open the file. Otherwise, you can click the "Find the application in the App Store" item, which can be easily found in the App Store. Quickly find the application corresponding to the file format, select the corresponding application item, view its description information, and if appropriate, download and install the application. [2]

Generally speaking, no matter what type of file, a specific identifier will be displayed at the beginning of it. For example, for EXE files, the identifier is "MZ". Use tools such as Notepad or WinHex to open the target file, find the identification information at the beginning of it, and then search online to learn the specific file type. In addition, using the software "Translate Extension", you can easily identify the actual file type. Enter the file extension in the upper right corner of its main interface and click the query button to quickly find the relevant description information and learn about its actual type. "Translate Extension" supports 6113 file types. For some special file types, if they cannot be recognized, you can click the "Submit" button to send them to the author for screening.

Save disk space

You can search for all .scr files in the system (type *.scr and then search), and delete unnecessary .scr files in the search results window files to save disk space. If you want to start the screen saver immediately, right-click on any of the .scr files and drag it to the desktop or the Start menu (or one of its submenus) and select "CreateShortcut". Then click this Shocrtut to start the screen saver.

Clear icons on the control panel

Sometimes these unwanted icons are not carried by the Windows system control panel itself, but by some other programs without permission installed. In this case, it is necessary for the reader to understand that the file extension of most control panel icons is .cpI. Type *.cpI in the Windows system search function to list applications related to the control panel in the system. Then double-click each listed file and filter out unnecessary files. Move these unwanted files to another folder or make a backup, and delete the original icon files. It is worth noting that sometimes multiple icons in the control panel may only represent one .cpl file. For example, if the main·cpl file is deleted, the keyboard, mouse, and printer icons will be deleted.

Setting Association

In Windows Control Panel-Default Programs-Setting Association, you can find almost all file types of this Windows. You can find the name, description and Associated program (current default).

For more related knowledge, please visit the FAQ column!

The above is the detailed content of The operating system distinguishes file types based on what is in the file. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Can I install mysql on Windows 7 Can I install mysql on Windows 7 Apr 08, 2025 pm 03:21 PM

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

Can mysql and mariadb coexist Can mysql and mariadb coexist Apr 08, 2025 pm 02:27 PM

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

Unable to log in to mysql as root Unable to log in to mysql as root Apr 08, 2025 pm 04:54 PM

The main reasons why you cannot log in to MySQL as root are permission problems, configuration file errors, password inconsistent, socket file problems, or firewall interception. The solution includes: check whether the bind-address parameter in the configuration file is configured correctly. Check whether the root user permissions have been modified or deleted and reset. Verify that the password is accurate, including case and special characters. Check socket file permission settings and paths. Check that the firewall blocks connections to the MySQL server.

Do mysql need to pay Do mysql need to pay Apr 08, 2025 pm 05:36 PM

MySQL has a free community version and a paid enterprise version. The community version can be used and modified for free, but the support is limited and is suitable for applications with low stability requirements and strong technical capabilities. The Enterprise Edition provides comprehensive commercial support for applications that require a stable, reliable, high-performance database and willing to pay for support. Factors considered when choosing a version include application criticality, budgeting, and technical skills. There is no perfect option, only the most suitable option, and you need to choose carefully according to the specific situation.

Unable to access mysql from terminal Unable to access mysql from terminal Apr 08, 2025 pm 04:57 PM

Unable to access MySQL from the terminal may be due to: MySQL service not running; connection command error; insufficient permissions; firewall blocks connection; MySQL configuration file error.

Can mysql run on android Can mysql run on android Apr 08, 2025 pm 05:03 PM

MySQL cannot run directly on Android, but it can be implemented indirectly by using the following methods: using the lightweight database SQLite, which is built on the Android system, does not require a separate server, and has a small resource usage, which is very suitable for mobile device applications. Remotely connect to the MySQL server and connect to the MySQL database on the remote server through the network for data reading and writing, but there are disadvantages such as strong network dependencies, security issues and server costs.

How to solve mysql cannot connect to local host How to solve mysql cannot connect to local host Apr 08, 2025 pm 02:24 PM

The MySQL connection may be due to the following reasons: MySQL service is not started, the firewall intercepts the connection, the port number is incorrect, the user name or password is incorrect, the listening address in my.cnf is improperly configured, etc. The troubleshooting steps include: 1. Check whether the MySQL service is running; 2. Adjust the firewall settings to allow MySQL to listen to port 3306; 3. Confirm that the port number is consistent with the actual port number; 4. Check whether the user name and password are correct; 5. Make sure the bind-address settings in my.cnf are correct.

Can mysql handle multiple connections Can mysql handle multiple connections Apr 08, 2025 pm 03:51 PM

MySQL can handle multiple concurrent connections and use multi-threading/multi-processing to assign independent execution environments to each client request to ensure that they are not disturbed. However, the number of concurrent connections is affected by system resources, MySQL configuration, query performance, storage engine and network environment. Optimization requires consideration of many factors such as code level (writing efficient SQL), configuration level (adjusting max_connections), hardware level (improving server configuration).