Optimize Your Search File With “ls *c”

One of the most important linux commands is the ls command,it´s command allows you to see the content behind your linux operating system to be able to interact with your files and directories. You can find all that you need using this command and your utilities.

USING ls

ls

But if you have a lot of files and directories, and you want to specify only that you need to see, then it is not a good idea to use the “ls” command alone. It is a good idea to use your default arguments or utilities that will help you organizing the search, reduce the filter and optimize the search.

COMMAND ls *.c

Sort the files and directories by file extension, omitting all other contents of the local directory in which you are.

The asterisk (*) indicates that all files with the .c extension will be listed regardless of name.

you can search all kinds of files by extension not only .c also works with .txt, .rar, .iso, etc …

COMMAND ls -l

For a better visualization use “ -l ” a long listing format. which allows you to view each file in separate rows whit more information about permissions, directories, user, size, modification date and the file. you can use different utilities at the same time “ls -l *.c”.

ls -l *.c

Now this is a small view of the command, you can find the utilities of “ls” using “ls --help” inside the terminal for more information on this powerful tool.

By: Luis Carvajal