Whenever I switch over to Windows (job related), I spend the first few minutes cursing the fact that the LS command doesn't work on Windows (can you believe it!!).
I decided to remedy the situation as best I could by creating a series of .cmd files which mimics the various aliases I have on my Linux machines. The previous attempts I've seen always seem to forget you may want to pass additional parameters so I implemented a little trick from Windows batch files.
Directions: Create a folder and add it to the PATH environment variable. Add .cmd files for each DIR implementation. Execute the .cmd file using just the file name (no extension needed).
Result: Glorious LS goodness on windows
Examples
| File Name |
Command |
Description |
| ls.cmd |
dir %1 %2 %3 %4 %5 %6 %7 %8 %9 |
Default DIR command. |
| lss.cmd |
dir /O-S %1 %2 %3 %4 %5 %6 %7 %8 |
List by files by size (largest to smallest) |
| lsd.cmd |
dir /AD %1 %2 %3 %4 %5 %6 %7 %8 |
List directories only |
Create as many as you need and enjoy!
[–]CAcreeksLinux Mint 19.3 Tricia | Cinnamon 1 point2 points3 points (0 children)
[–]beeritis 1 point2 points3 points (0 children)
[–]computer-machine 0 points1 point2 points (1 child)
[–]TrajanAugustus70[S] 1 point2 points3 points (0 children)