What is the Windows command prompt equivalent for th unix command 'ls -lah'?
The dos/win command dir
is the equivalent of *nix's ls
The dir
command by default produces a long listing, so you don't need to find an equivalent for the -l
parameter.
To produce a listing of all files (ie -a
in *nix), you need to indicate that you want readonly, hidden and system files. This is done with /a
.
There is no equivalent to *nix's -h parameter which changes the unit of measure for file sizes from bytes to KB, MB or GB with a single letter suffix (e.g., 1K 234M 2G).
So, the nearest equivalent to ls -lah
in *nix is:
dir /a
This will produce a long style list (ie will include attributes) of all files which as close as you can get to ls -lah
The /w
parameter to dir
actually produces the equivalent of the *nix ls
command (ie without the long list provided by '-l'), so including this is not technically the correct answer.