The command ls *.c and how use

--

What is the shell?

The Shell in the world of informatics is known as the command interpreter which, by means of instructions provided by it, we can communicate with the core of the computer. Defined in another way, the Shell is the communication bridge between the kernel and the user.

what is a command?

A command is those words reserved by the system, which can be used to execute certain actions that allow creating, modifying or moving files and folders, etc.

Structure of command:

command [options] [arguments]

What is the command ls?

This command, as its definition indicates, allows us to list the contents of the directory where it is located.

ls -a .

  • ls ->[command].
  • a ->[option] allows listing all files in the directory.
  • . ->[file] show in current directory.

Its structure is as follows:
ls [OPTION] … [FILE] …
[option] -> options that the command has
[file] -> directory where it will be used

Wildcard *

Wildcards have the ability to refer to more than one file using regular expressions.

The wildcard “*” when implemented refers to any character string in the file name.

Command ls *.c

Already observing the previous terms we can conclude that this command aims to list all the files that have “.c” in their current directory.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sebastian Obando Perez (seobando)
Sebastian Obando Perez (seobando)

No responses yet

Write a response