(redirected from Dir (Unix))
Also found in: Dictionary, Legal, Financial.


(file system, tool)
The Unix command for listing a directory.

Unix manual page: ls(1).


The country code for Lesotho.
This article is provided by FOLDOC - Free Online Dictionary of Computing (


1. Abbr. for “left side.”
2. Abbr. for loudspeaker.
McGraw-Hill Dictionary of Architecture and Construction. Copyright © 2003 by McGraw-Hill Companies, Inc.


(LiSt) The command in Unix/Linux, including macOS, that displays file names in the directory (folder). It is the counterpart to the DIR command in Windows and DOS. Following are some brief examples. Note that commands are case sensitive; for example, file names with upper case extensions must be expressed with upper case characters in the command; the same for lower case. See Unix commands and dot file.
ls      list all files
 ls -l   list all files and details

 ls *.GIF      list GIF files
 ls *.gif      list gif files
 ls *.gif -l   list gif files and details

 ls | wc -l         count all files
 ls *.GIF | wc -l   count GIF files
 ls *.gif | ws -l   count gif files

  wc = word count
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.