What happens when you type ls *.c

David Arias Fuentes
2 min readJun 8, 2020

“ls” is the Unix command to list all the files in your current directory, but there are some special options for it, to look for a special file extension in common into the folder.

It’s short for the word list [ls] (it’s a great practice to think about any command’s function and why the language’s inventor would name the command such). So by typing in [ls] and hitting [Enter]

The Unix commands can refine what they do (their functionality) using Options and Wildcards. In this case, we want to list (output) all files (within our current directory) with the filename extension “.c” by using the “ * ” wildcard.

ls *.c

We only get the files with the filename extensions “.c” (which are C programming language files).

Made by David Arias

--

--