Site icon TestingDocs.com

Linux Filenames & File extensions

Linux Filenames & File extensions

In this tutorial, we will understand and learn Linux Filenames and File extensions. Every file in the Linux operating system has a filename.

Filenames

We can create files using the file management GUI applications like Files, Dolphin, etc. We can also create files using Konsole, Terminal commands, and Shell scripts.

Linux filenames can contain uppercase and lowercase letters[A-Z and a-z], digits [0-9], special characters like underscore , period,comma, etc. Filenames can be up to 255 characters long. If we exceed the limit, we usually get a File name too long error.

The Linux filenames cannot contain the slash character (/) and the
null character. The slash character separates the filenames that form
the file pathname. File pathnames identify the files in the Linux filesystem.

A directory cannot have files with the same filename. However, files in different directories can have the same name.

File Extensions

Filename extensions describe the type and contents of the file. For example, the extension *.txt is used for test files,  *.html is used for HTML files, *.cpp is used for C++ source code files, the extension *.h is used for C++ header files, the extension .o is used for an object code file, etc.

Linux is case-sensitive

Unlike Windows, the Linux operating system is case-sensitive for directory and file names. On Linux, for example, ‘array.cpp’ and ‘Array.cpp’ are two distinct files.

 

Linux Tutorials

Linux commands tutorial on this website:

https://www.testingdocs.com/linux-basic-commands-tutorial/

For more information on Ubuntu Linux, visit the website:

https://ubuntu.com/

 

Exit mobile version