What is the first character of the output in ls –l command ?

We use ls -l command to list the files and directories in a directory. With -l option we get long listing format.

In this format the first character identifies the entry type. The entry type can be one of the following:

  • b Block special file
  • c Character special file
  • d Directory
  • l Symbolic link
  • s Socket link
  • p FIFO
  • – Regular file

In general we see d for directory and – for a regular file.

Leave a Reply

Your email address will not be published. Required fields are marked *