微软开源的命令行外壳和脚本环境 PowerShell.zip

时间:2022-08-08 00:34:34
【文件属性】:
文件名称:微软开源的命令行外壳和脚本环境 PowerShell.zip
文件大小:10.84MB
文件格式:ZIP
更新时间:2022-08-08 00:34:34
开源项目 PowerShell 是一个跨平台的 (Windows, Linux 和 OS X) 自动化和配置工具(框架),可以和已有的工具友好集成,特别优化用于处理结构化数据 (如 JSON, CSV, XML 等), REST APIs 以及对象模型。它包含一个命令行 Shell、一个关联的脚本语言以及一个用于处理 cmdlets 的框架。PowerShell 就相当于 Linux 下的 Bash 以及 SHELL 脚本编程语言。PowerShell 与 Bash 的对别:BashPowerShellDescriptionlsdir, Get-ChildItemList files and folderstreedir -RecurseList all files and folderscdcd, Set-LocationChange directorypwdpwd, $pwd, Get-LocationShow working directoryclear, Ctrl L, resetcls, clearClear screenmkdirNew-Item -ItemType DirectoryCreate a new foldertouch test.txtNew-Item -Path test.txtCreate a new empty filecat test1.txt test2.txtGet-Content test1.txt, test2.txtDisplay files contentscp ./source.txt ./dest/dest.txtCopy-Item source.txt dest/dest.txtCopy a filecp -r ./source ./destCopy-Item ./source ./dest -RecurseRecursively copy from one folder to anothermv ./source.txt ./dest/dest.txtMove-Item ./source.txt ./dest/dest.txtMove a file to other folderrm test.txtRemove-Item test.txtDelete a filerm -r Remove-Item -RecurseDelete a folderfind -name build*Get-ChildItem build* -RecurseFind a file or folder starting with 'build'grep -Rin "sometext" --include="*.cs"Get-ChildItem -Recurse -Filter *.cs | Select-String -Pattern "sometext"Recursively case-insensitive search for text in files 标签:微软  外壳和脚本

网友评论