How To List Directory Contents In UNIX

IT Support Forum Forums Linux & UNIX Tru64 UNIX General Discussion How To List Directory Contents In UNIX


This topic contains 0 replies, has 1 voice, and was last updated by  Webmaster 4 years, 8 months ago.

  • Author
  • #964


    To list directories or the contents of a directory in UNIX, type ls. But for a more advanced list of directories, you can use the following shell commands:

    • ls -R – This lists directories recursively (All directories within the current directory)
    • ls -l – This gives details, such as the amount of space used by the directories

    The above command switches can be combined, for example you can do ls -Rl to list details of directories, recursively.

    ❗ Note: The case of the command switches is important in UNIX.

You must be logged in to reply to this topic.