前段日子安裝了SQL2008CTP,並意外發現了一個工具,叫做"Windows PowerShell 1.0",好奇心的驅使,我打開了這個工具,既爲POWER,是不是也支持LINUX下的SHELL命令呢?
LS/MAN/RM/CP等居然都支持,也支持MAN,雖然在實現在不同,但我想至少是在向UNIX邁步了,但是一旦MAN LS後,得到的幫助內容是如下的:
NAME
Get-ChildItem
SYNOPSIS
Gets the items and child items in one or more specified locations.
SYNTAX
Get-ChildItem [[-path] <string[]>] [[-filter] <string>] [-include <string[]>] [-exclude <string[]>] [-name] [-recur
se] [-force] [<CommonParameters>]
Get-ChildItem [-literalPath] <string[]> [[-filter] <string>] [-include <string[]>] [-exclude <string[]>] [-name] [-
recurse] [-force] [<CommonParameters>]
DETAILED DESCRIPTION
The Get-Childitem cmdlet gets the items in one or more specified locations. If the item is a container, it gets the
items inside the container, known as child items. You can use the Recurse parameter to get items in all child cont
ainers A location can be a file system location, such as a directory, or a location exposed by another provider, su
ch as a registry hive or a certificate store.
RELATED LINKS
Get-Item
Get-Alias
Get-Location
Get-Process
about_namespace
REMARKS
For more information, type: "get-help Get-ChildItem -detailed".
For technical information, type: "get-help Get-ChildItem -full".
也就是雖然MAN LS了,但是MS卻提供了另一個命令的使用方法,後來看到MS也提供了LINK,是否LS就是一get-childitem的LINK呢,乾脆就直接MAN,可用的命令有很多,挑幾個重要的:
ls Alias Get-ChildItem
history Alias Get-History
kill Alias Stop-Process
lp Alias Out-Printer
ls Alias Get-ChildItem
mount Alias New-PSDrive
mv Alias Move-Item
popd Alias Pop-Location
ps Alias Get-Process
pushd Alias Push-Location
pwd Alias Get-Location
等等命令只是一個ALIAS,MS你做個SHELL也罷了,爲什麼了提供ALIAS指向UNIX命令?
另外在"USER GUIDE"看到: