commands summary
alias (show aliases)
apropos
get-help
basename
dir | select name
cal
No equivalent, but see the script at http://www.vistax64.com/powershell/17834-unix-cal-command.html
cd
cd
clear
clear-host
date
get-date
date -s
set-date
df -k
Get-WMIObject Win32_LogicalDisk | ft -a
diff
Compare-Object -ReferenceObject (Get-Content file1) -DifferenceObject (Get-Content file2)
dirname
dir | select directory
du
No equivalent, but see the
echo
write-output
echo -n
write-host -nonewline
| egrep -i sql
| where {[Regex]::Ismatch($\_.name.tolower(), "sql") }
egrep -i
select-string
egrep
select-string -casesensitive
egrep -v
select-string -notmatch
env
or
get-variable
errpt
get-eventlog
find
for (start, stop, step)
for ($i = 1; $i -le 5; $i++) {whatever}
head
gc file.txt | select-object -first 10
history
get-history
history | egrep -i ls
history | select commandline | where commandline -like '*ls*' | fl
hostname
hostname
if-then-else
if ( condition ) { do-this } elseif { do-that } else {do-theother}
if [ -f “$FileName” ]
if (test-path $FileName)
kill
stop-process
less
more
locate
no equivalent but see link
ls
get-childitem OR gci OR dir OR ls
ls -a
ls -force
ls -ltr
dir c:\ | sort-object -property lastwritetime
lsusb
gwmi Win32_USBControllerDevice
mailx
send-mailmessage
man
get-help
more
more
mv
rename-item
pg
ps -ef | grep oracle
get-process oracle
pwd
get-location
read
read-host
rm
remove-item
script
start-transcript
sleep
start-sleep
sort
sort-object
sort -uniq
get-unique
tail
gc file.txt | select-object -last 10
tail -f
gc -tail 10 -wait file.txt
time
measure-command
touch - create an empty file
set-content -Path ./file.txt -Value $null
touch - update the modified date
set-itemproperty -path ./file.txt -name LastWriteTime -value $(get-date)
wc -l
gc ./file.txt | measure-object | select count
whoami
[Security.Principal.WindowsIdentity]::GetCurrent() | select name
whence or type
No direct equivalent, but see link
unalias
remove-item -path alias:aliasname
uname -m