Scroll Top

Linux Commands Training Quick Tips – Understand How to Use Linux Directory and File Names – Red Hat

Linux directory and file names are “case sensitive” and can be up to 255 characters in length.

To avoid using one of the many (approximately twenty) “illegal” characters, just use the letters a-z, A-Z and the numbers 0-9 for your Linux directory and file names.

To make your Linux commands easier to run, you may want to always use lower case letters for directory and file names.

Some programs will not work properly with directories and files that contain spaces. Therefore, it is best to avoid using spaces and use the – (dash) or _ (underscore) character instead, if necessary.

A – (dash) is often useful in a directory or file name – to make a directory or file name easier to read.

A directory or file name can contain a suffix (a.k.a. file extension) at the end of the directory or file name.

This is a . (dot) followed by one or more characters, such as “.o“, “.ps” and “.png“. It can even include another . (dot) followed by more characters, such as “.1.gz“.

Common Linux Directory and File Suffixes

There are several “standard” suffixes that are used for program files and data files. Below are a few examples of the many different suffixes.

.dat – data file

.txt – text file

.bak – backup file

.db – database file

.htm, .html – hypertext markup language (web page) file

.ps – PostScript file

.wav – audio file

.png, .jpg, .gif – graphic file

.lock – locks a file that is in use so that it can not be written to

.o – object code file or module file

.h – header file of a C or C++ program

.c C – program source code file

.so – library file

.gz, .tgz, .bz2 – compressed program and data files

Linux system and server Configuration files commonly use the following suffixes:

.conf, .cfg, .config and .cf



AUTOPOST by BEDEWY VISIT GAHZLY

Related Posts

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.