2011年1月14日星期五

PowerShell 文件系统处理命令

文件系统处理命令集

命令简化命令说明
Get-ChildItemgci, ls, dir  指定目录的文件一览列表

命令简化命令说明
Add-Contentac向指定文件追加内容
Clear-Contentclc清除文件内容
Get-Contentgc, cat, type取得文件内容
Set-Contentsc覆盖文件内容
New-Itemni做新文件

命令简化命令说明
Move-Itemmi, mv, move移动文件
Remove-Itemri, rm, rmdir, del, erase, rd删除文件
Copy-Itemcpi, cp, copy复制文件
Rename-Itemrni, ren文件重命名

命令简化命令说明
Get-Locationgl, pwd取得现在目录
Pop-Locationpopd目录堆栈推出pop
Push-Locationpushd目录堆栈压入push
Set-Locationsl, cd, chdir目录变更

没有评论: