Welcome to MSDN Blogs Sign in | Join | Help

Monad cheat sheet for cmd.exe users

 Many people in windows environment are cmd.exe users. This cheat sheet will help these users to move to Monad shell easily by showing cmd.exe equivalents in Monad.

 

I will keep this blog uptodate as I discover commands for which users are struggling.

 

 

 

CMD.EXE

Monad Equivalent

cd

set-location

cd

cd c:\temp

set-location c:\temp

cls

clear-host

cls

copy con

function copycon {

    [system.console]::in.readtoend()

}

 

 

copy con foo.txt

copycon | set-content foo.txt

dir

get-childitem

dir

dir /ad

get-childitem | where { $_.MshIsContainer }

dir | where { $_.MshIsContainer }

dir /od

get-childitem | sort-object LastWriteTime

dir | sort LastWriteTime

dir /o-d

get-childitem | sort-object LastWriteTime -desc

dir | sort LastWriteTime -desc

pushd

push-location

popd

pop-location

start .

invoke-item  .

ii .

 

Published Wednesday, March 08, 2006 3:15 PM by arulk

Comments

# re: Monad cheat sheet for cmd.exe users

Just a little quibble... In CMD if you type "cd" all by itself (the example in the first line of your table) it shows your current directory. So, the monad equivalent would be "get-location".
Thursday, March 09, 2006 1:33 PM by lawty

# re: Monad cheat sheet for cmd.exe users

A shortcut for "dir /w" is:

get-childitem | format-wide -auto

You can also do multikey sorts so my default "dir" function in Monad is:

function dir {
   get-childitem $args -force |
   sort @{e={$_.MshIsContainer}; asc=$false},
        @{e={$_.Name}; asc=$true}
}

This puts directories first, followed by files and then sorts by name which is equivalent to setting DIRCMD to /OGn.
Thursday, March 09, 2006 2:07 PM by KeithH

# The Hive Archive » Microsoft’s Monad Misses the Mark

Tuesday, April 25, 2006 7:52 PM by The Hive Archive » Microsoft’s Monad Misses the Mark

# Arul Kumaravel s WebLog Monad cheat sheet for cmd exe users | Paid Surveys

# Arul Kumaravel s WebLog Monad cheat sheet for cmd exe users | debt settlement program

Anonymous comments are disabled
 
Page view tracker