What happens when you type ls *.c

Garthus
1 min readSep 14, 2020

“ls” is a Unix-like command used to print the content of a directory and list files. Without any options and argument the ls command list the content of the current directory sorted alphabetically.

If you want to print files or folders containing specific string you can use the wildcard “*”.

The asterisk means everything, so when you type“ls *.c” it means that you want to print all files or directory in the current directory which ends with “.c”.

--

--