Gnu – ls

This command allows you to list files and directories (dir in Ms-dos world). Lets see how this works.

The format is as follows:

ls [OPTION]… [FILE]…

You can type ls as is to show a barebones listing of files and directories. Lets see more possibilities:

  • ls -l -> this shows the long listing format (its a compact way to show the info)
  • ls -a -> shows only the hidden files (the ones starting with a dot)
  • ls -la -> shows all files in listing format plus, the hidden ones
  • ls -i -> shows inode information about the files (info about the file system)
  • la -lh -> shows files and details in human readable format
  • ls -lha -> You get the idea, you can combine the options to get the result that you want, with this you get details in human readable format plus hidden files

As you can see there are many combinations. Those here are just a tiny fraction of what is possible with this command. If you want more info, type man ls to see the full list of options.

Deja una respuesta

Tu dirección de correo electrónico no será publicada.