ls (whose translation list) Is a command of the Unix operating system and its derivatives that shows a list of files and directories in a certain directory. The results are listed alphabetically.

Files and directories whose name begins with. (period) are not displayed with the ls instruction, so they are often referred to as “hidden files.” The -a option to ls inhibits this behavior, and displays all files and subdirectories, even those beginning with a period. It is one of the most basic tools on Unix operating systems, so it is part of the GNU Coreutils package.

The ls command is very useful to see the files and directories that we have within the directory in which we are and these would be one of these options of the commands that we have present:

ls Commands

▸ls -t: Sort files by modification date.

▸ls -l: Shows a list in long format, with information on permissions, number of links associated with the file, user, group, size and date of last modification in addition to the name.

▸ls -a: It shows us the files and directories within the current directory, including hidden files and directories.

▸ls -s: Shows the file size in kilobytes before the file name.

▸ls -m: Displays files on one line and separated by commas.

▸ls -lh: It shows the same information as ls -l but with the size units in KB, MB, etc.

▸ls -d: Shows only sthe name of the subdirectory, without entering it or listing the contents.


Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *