What happens when you type ls *.c
ls
The ls command enumerates or lists in alphabetical order the names of all content in the current working directory (directories, subdirectories, and files). Type ls and then the directory path.
It is a wildcard that allows us to substitute any character, as many times as we need. An example of its use may be that we want to copy all the text files (.txt) to another folder, we can use the command mv *.txt dir_to _move.
ls *.c
In this command ls will alphabetically list the content of the path that follows, in this case it would be *.c and this tells us that it will list all the files that have the ending .c, since the * replaces any name that the files may have.


Comentarios
Publicar un comentario