powershell与linux bash对比
2024-09-07 12:40:18
Bash | PowerShell | Description |
---|---|---|
ls | dir, Get-ChildItem | List files and folders |
tree | dir -Recurse, Get-ChildItem -Recurse | List all files and folders |
cd | cd, Set-Location | Change directory |
pwd | pwd, $pwd, Get-Location | Show working directory |
clear, Ctrl+L, reset | cls, clear | Clear screen |
mkdir | New-Item -ItemType Directory | Create a new folder |
touch test.txt | New-Item -Path test.txt | Create a new empty file |
cat test1.txt test2.txt | Get-Content test1.txt, test2.txt | Display files contents |
cp ./source.txt ./dest/dest.txt | Copy-Item source.txt dest/dest.txt | Copy a file |
cp -r ./source ./dest | Copy-Item ./source ./dest -Recurse | Recursively copy from one folder to another |
mv ./source.txt ./dest/dest.txt | Move-Item ./source.txt ./dest/dest.txt | Move a file to other folder |
rm test.txt | Remove-Item test.txt | Delete a file |
rm -r <folderName> | Remove-Item <folderName> -Recurse | Delete a folder |
find -name build* | Get-ChildItem build* -Recurse | Find 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 |
curl https://github.com | Invoke-RestMethod https://github.com | Transfer data to or from the web |
最新文章
- [转]如何设置eclipse中js默认打开为java Editor
- 原生js封装ajax:传json,str,excel文件上传表单提交
- lua 基础 2 类型和值
- meta标签总结
- [CareerCup] 5.3 Next Binary Representation 下一个二进制表达
- Linux 解压命令tar的理解
- 按钮靠右css小结
- iOS开发中GCD在多线程方面的理解
- POJ 3252 Round Numbers(数位dp)
- (转载)linux那点事儿(中)
- proxifier 注册码
- php之手机号码查归属地
- 【转】Android NDK开发入门实例
- if语句之有房么?有钱么?有能力么?
- dubbo负载均衡策略及对应源码分析
- phpstorm中配置真正的远程调试(xdebug)
- 用Python满足满足自己的“小虚荣”
- 云主机中毒 cpu爆满解决日志
- Python爬虫-04:贴吧爬虫以及GET和POST的区别
- 步步为营-87-imageAreaSelect插件使用(图片剪切)
热门文章
- SpringCloud的入门学习之Netflix-eureka(Eureka的集群版搭建)
- IDEA maven设置配置
- U8 BOM数据结构
- vue浏览器全屏实现
- ES6入门系列 ----- 使用Proxy 实现观察者模式
- 利用Fiddler模拟通过Dynamics 365的OAuth 2 Client Credentials认证后调用Web API
- 【转载】Android 的 Handler 机制实现原理分析
- setValueForKeysWithDictionary的底层实现
- SparkStreaming wordCountDemo基础案例
- SpringCloud学习笔记(四、SpringCloud Netflix Ribbon)