lunes, 16 de septiembre de 2019

Understanding linux command ls *.c










Image 1.

ls is a unix like system command that prints on screen the content of current directory or the directory that is passed as parameter, as it's shown below.


Image 2.

When the command ls is used with the wilcard * following a file extension (e.g .c), it tells the system that it wants to list all files that have the desired extension regardless of what was before.

Examples:

  • ls
  • ls /etc/init.d
  • ls *.c
  • ls *.txt

No hay comentarios:

Publicar un comentario