Using ls *.c
Jun 17, 2019
This blog has the information about the Linux command list “ls” for list all c files.
First, we are going to see the syntax:
ls [OPTION] [file]
only type ls print the files and directories in your current directory. But when you use options you can print long formats, hide files, information about the author, etc. However you can type wildcards like *, It is like an all word and if you write something after that you are (ls *something) listing all files that end with that you wrote (in this case something)
Now we are going to type ls *.c, It means:
- listing (ls)
- all (*)
- c files (.c)
Bibliography
William E. Shotts, Jr., The Linux Command line 4th edition, book