What happens when you type

Othmaniamir
Apr 14, 2021

`ls -l *.c` in the shell

The ls command list all files in the current directory, ls *.c lists all files that the name end with “.c”, in others word list all file type .c

The ‘*’ wildcard expansion is a way of telling the Linux operating system to find all of a certain criteria.You see all without defining something specific so instead it is often paired with a file extension such as .jpg (the file extension for pictures) or .js (Javascript files).

If a programmer was to type ls *.c the computer would interpret this as find all files in the current directory that have a .c (C programming language) file extension.

To simplify this imagine all of the files in your file system are represented by Skittles. The different colors represent different things such as directories, folders, and files.

--

--