mohamed chedli
2 min readSep 15, 2020

--

What happens when you type “ls *.c”

example for the “ls*.c”

. WHAT IS THE LS COMMAND

At first the ls command is basically, ls command is a basic command in Linux used to List files and directories. ls command comes with so many arguments and features like you can sort files and directories by Date, by Size, able to check hidden files and directories, permissions, inode information and so on.

. The “*.c*

the Matches any string, of any length .. in this example the “ls *.c” is meant to list all type of files that ends with the .c

. Does bash prints the prompt while using the “ls” command ?

Simply put, a command prompt is an input field in the terminal emulator (CLI) which lets you input/issue commands. The command prompt provides some useful information to the user.

.WHAT IS THE ALIAS COMMAND

The alias command makes it possible to launch any command or group of commands (inclusive of any options, arguments and redirection) by entering a pre-set string (i.e., sequence of characters).

That is, it allows a user to create simple names or abbreviations (even consisting of just a single character) for commands regardless of how complex the original commands are and then use them in the same way that ordinary commands are used.

A command is an instruction given by a user to tell a computer to do something. Commands are generally issued by typing them in at the command line (i.e., an all-text user interface) and then pressing the ENTER key, which passes them to the shell. A shell is a program that provides the traditional, text-only user interface for a Unix-like operating systems. Its primary function is to read commands and then execute (i.e., run) them.

The alias command is built into a number of shells including ash, bash (the default shell on most Linux systems), csh and ksh. It is one of several ways to customize the shell (another is setting environmental variables). Aliases are recognized only by the shell in which they are created, and they apply only for the user that creates them, unless that user is the root (i.e., administrative) user, which can create aliases for any user.

.How the path command works

Purpose: Sets or displays directories that will be searched for programs not in the current directory. PATH tells DOS which directories should be searched for external commands after DOS searches your working directory. DOS searches the paths in the order specified in the PATH command.

PATH works in a similar way — it’s a global variable that contains a string of different paths separated by a : . When you type the name of an program without using the absolute path, your computer then uses this variable to understand what directories it should look in to find the executable you’re requesting

--

--