What is the 'ls -F' command?

0115

The ls -F command is used to list directory contents while appending a character to the end of each file or directory name to indicate its type. Here’s what the characters mean:

  • A trailing / indicates a directory.
  • A trailing * indicates an executable file.
  • A trailing @ indicates a symbolic link.
  • A trailing | indicates a named pipe.
  • A trailing = indicates a socket.

For example, running the command:

ls -F

might produce output like this:

file1.txt  file2.txt*  directory1/  link_to_file@

This helps you quickly identify the types of files and directories in the listing.

0 Comments

no data
Be the first to share your comment!