In Linux: ls
In Windows: dir
The command in a terminal is: ls (short for List). This will list the files in the current directory. Whilst in the Home directory, to list the files in a different directory, for instance Videos, use: ls Videos.
DIR
control+x+insert
ls will list the contents of a directory.
ls | sort -r Use ls command to list all files, in the present directory. Then pipe '|' the output of the ls command to sort -r. The -r option will reverse the sort.
dir Lists all files and directories in the directory that you are currently in. dir /ad List only the directories in the current directory. If you need to move into one of the directories listed use the CD command. dir /s Lists the files in the directory that you are in and all sub directories after that directory, if you are at root "C:\>" and type this command this will list to you every file and directory on the C: drive of the computer. dir /p If the directory has a lot of files and you cannot read all the files as they scroll by, you can use this command and it will display all files one page at a time. dir /w If you don't need the info on the date / time and other information on the files, you can use this command to list just the files and directories going horizontally, taking as little as space needed. dir /s /w /p This would list all the files and directories in the current directory and the sub directories after that, in wide format and one page at a time. dir /on List the files in alphabetical order by the names of the files. dir /o-n List the files in reverse alphabetical order by the names of the files. dir \ /s |find "i" |more A nice command to list all directories on the hard drive, one screen page at a time, and see the number of files in each directory and the amount of space each occupies. dir > myfile.txt Takes the output of dir and re-routes it to the file myfile.txt instead of outputting it to the screen.
LS typically stands for "List" and is a command used in Unix and Unix-like operating systems to list directory contents. It displays the files and folders within a specified directory.
Assuming you are looking for a specific file in a location, it's as simple as ls <name of file.> assuming you are in the directory you expect it to be in.
A directory list usually contains lists of information. An example of a physical directory list would be the Yellow Pages. For computers, a directory list would either be a list of files or a list of links to other files.
Exploration is the best thing! Try it! It's a commonly used command. It lists the files in the current directory (or another directory if you specify). You can use flags to choose what information you need to see.
Folder or files which start with . will not not be appear in directory list Amit Gupta
dir