Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to determine whether a file in Linux has an extension or not

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "how to determine whether there is an extension in the Linux file", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "how to determine whether there is an extension in the Linux file" it!

We know that the Linux file system is one of the basic functions supported by the Linux kernel and forms an inverted tree-like cascade structure from the root / down. Files and directories are the two basic elements of the Linux file system. (in a broad sense) files are divided into ordinary files, directory files, connection files and special files. Different file types can be identified through the file command.

Linux is not as strict about the extension of files as required by windows, so in the process of using linux, we often encounter that some files do not have an extension at all, so how should we judge whether a file without an extension is a file or a directory? In fact, we can check the file type with the help of file. The example is as follows:

[root@localhost ~] # file install.log

Install.log: UTF-8 Unicode text

Install.log is a text file

[root@localhost ~] # file / usr/local/

/ usr/local/: directory

/ usr/local is the directory

Thank you for your reading, the above is the content of "how to judge whether there is an extension in Linux". After the study of this article, I believe you have a deeper understanding of how to judge whether a file in Linux has an extension or not. the specific use also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report