Manuel Enrique Figueroa
1 min readSep 15, 2020

--

What happens when you type ls *.c

ls *.c In the command line

This is a wonderful example of how wildcards can be used to enhance the use of the ls command. Basically when ls*.c is entered in the command line it will print whatever files end with the .c file extension. The * in the command represents all file names however it can be used to find files named the matching string/character. Here is some syntax for the command ls using wildcards ( ls [h*.js] ) this command will display and files starting with an lowercase h and ending the the .js file extension.

Another example:

In this example the original output for the ls command is above and the ls wildcard output is on the bottom

As you can see the regular ls command displays all the files in the directoy minus any hidden files. However when we used the ls 0* it only displayed any files starting with a zero.

Now you can use ls and wildcards to your advantage!

--

--

Manuel Enrique Figueroa
0 Followers

I am a current student at Holberton school of software engineering aspiring to have a career in full stack software engineering.