commands summary

    alias (show aliases)

    apropos

    1. get-help

    More

    basename

    1. dir | select name

    cal

    No equivalent, but see the script at http://www.vistax64.com/powershell/17834-unix-cal-command.html

    cd

    1. cd

    clear

    1. clear-host

    More

    date

    1. get-date

    date -s

    1. set-date

    More

    df -k

    1. Get-WMIObject Win32_LogicalDisk | ft -a

    diff

    1. Compare-Object -ReferenceObject (Get-Content file1) -DifferenceObject (Get-Content file2)

    dirname

    1. dir | select directory

    More

    du

    No equivalent, but see the

    echo

    1. write-output

    More

    echo -n

    1. write-host -nonewline

    | egrep -i sql

    1. | where {[Regex]::Ismatch($\_.name.tolower(), "sql") }

    More

    egrep -i

    1. select-string

    egrep

    1. select-string -casesensitive

    More

    egrep -v

    1. select-string -notmatch

    env

      or

      1. get-variable

      More

      errpt

      1. get-eventlog

      find

      More

      for (start, stop, step)

      1. for ($i = 1; $i -le 5; $i++) {whatever}

      head

      1. gc file.txt | select-object -first 10

      More

      history

      1. get-history

      history | egrep -i ls

      1. history | select commandline | where commandline -like '*ls*' | fl

      More

      hostname

      1. hostname

      if-then-else

      1. if ( condition ) { do-this } elseif { do-that } else {do-theother}

      More

      if [ -f “$FileName” ]

      1. if (test-path $FileName)

      kill

      1. stop-process

      More

      less

      1. more

      locate

      1. no equivalent but see link

      More

      ls

      1. get-childitem OR gci OR dir OR ls

      ls -a

      1. ls -force

      More

      ls -ltr

      1. dir c:\ | sort-object -property lastwritetime

      lsusb

      1. gwmi Win32_USBControllerDevice

      More

      mailx

      1. send-mailmessage

      man

      1. get-help

      More

      more

      1. more

      mv

      1. rename-item

      More

      pg

      ps -ef | grep oracle

      1. get-process oracle

      More

      pwd

      1. get-location

      read

      1. read-host

      More

      rm

      1. remove-item

      script

      1. start-transcript

      More

      sleep

      1. start-sleep

      sort

      1. sort-object

      More

      sort -uniq

      1. get-unique

      tail

      1. gc file.txt | select-object -last 10

      More

      tail -f

      1. gc -tail 10 -wait file.txt

      time

      1. measure-command

      More

      touch - create an empty file

      1. set-content -Path ./file.txt -Value $null

      touch - update the modified date

      1. set-itemproperty -path ./file.txt -name LastWriteTime -value $(get-date)

      More

      wc -l

      1. gc ./file.txt | measure-object | select count

      whoami

      1. [Security.Principal.WindowsIdentity]::GetCurrent() | select name

      More

      whence or type

      1. No direct equivalent, but see link

      unalias

      1. remove-item -path alias:aliasname

      More

      uname -m

        uptime

        More

        \ (line continuation)