powershell与linux bash对比
| 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 |
powershell与linux bash对比的更多相关文章
- PowerShell与Unix Shell对比:八大实例
PowerShell与Unix Shell对比:八大实例 本文将从八个实例对比PowerShell和Unix Shell,通常是Linux Bourne Shell(包括sh.ksh和bash等).二 ...
- Linux Bash命令杂记(tr col join paste expand)
Linux Bash命令杂记(tr col join paste expand) tr命令 tr命令可以将输入的数据中的某些字符做替换或者是作删除 tr [-ds] STR d: 删除输入数据的中的S ...
- 转: windows 10使用原生linux bash命令行
转: https://www.zybuluo.com/pandait/note/337430 windows 10使用原生linux bash命令行 linux bash windows-10 第一时 ...
- Linux Bash代码 利用for循环实现命令的多次执行
Linux Bash代码 [yuanhao15@lu01 libsvm-rank-2.81]$ for ((i=0; i<=19; i++)) do ./svm-train -s 5 -c 10 ...
- linux BASH shell设置字体与背景颜色
linux BASH shell下设置字体及背景颜色的方法. BASH shell下设置字体及背景颜色 echo -e "\e[31mtest\e[41m" \e[30m 将字 ...
- Linux:-bash: ***: command not found
Linux:-bash: ***: command not found,系统很多命令都用不了,均提示没有此命令. 突然之间linux很多命令都用不了,均提示没有此命令. 这应该是系统环境变量出现了问题 ...
- Linux Bash命令关于程序调试详解
转载:http://os.51cto.com/art/201006/207230.htm 参考:<Linux shell 脚本攻略>Page22-23 Linux bash程序在程序员的使 ...
- 禁用Linux bash rm --force
防止无意的Linux bash rm --force 二.禁用rm -rf 因为rm -rf 删除文件的时候,经常会不小心将系统文件或者多个有用的目录删除掉.有两种方法:1,每次删除都用-i(inte ...
- linux bash关闭标准输出1(exec 1<&-)后重新打开
linux bash shell的再次学习. 文件描述符: stdin,stdout 和 stderr 的文件描述符分别是 0,1 和 2(一个文件描述符说白了就是文件系统为了跟踪这个打开的文件而分配 ...
随机推荐
- requests库的使用、安装及方法的简单介绍
requests库的使用.安装及方法的简单介绍 1.requests库的概述 requests库是一个简洁且简单的处理HTTP请求的第三方库,是公认的最好获得第三方信息的库. requests库更多信 ...
- 二维码生成 Gma.QrCodeNet (目前测试支持.net4.0及以上,但vs版本2010不可以 NuGet中搜索不到程序包)
1.添加程序包 2.生产二维码方法 #region 二维码 /// <summary> /// 生成二维码 /// </summary> /// <param name= ...
- QP编码详解
- 原理 QP编码是一种使用可打印的ASCII字符 (如字母.数字与"=")表示各种编码格式下的字符.其方法是将一个8bit的字符表示成两个16进制数,并在前面加一个"= ...
- 模板引擎Jinja2的基本用法
Flask提供的模板引擎为Jinja2,易于使用,功能强大.模板仅仅是文本文件,它可以生成任何基于文本的格式(HTML.XML.CSV.LaTex 等等). 它并没有特定的扩展名, .html 或 . ...
- Java垃圾收集器——Serial,Parallel,CMS,G1收集器概述
1.概述 Java应用启动的时候,除了配置Xms以及Xmx参数(Xmx:InitialHeapSize, Xms:MaxHeapSize),还需要选择合适的垃圾收集器. 截止Jdk1.8,共提供了7款 ...
- 概要设计文档(final)
1. 引言部分 引言部分主要说明编写目的.系统的范围和参考资料等. 1.1目的 该文档的目的是描述“自习吧”微信小程序的概要设计,主要内容包括系统功能简介.系统结构设计.模块设计和界面设计等. 本文档 ...
- CodeForces - 1255C(构造+模拟)
题意 https://vjudge.net/problem/CodeForces-1255C 一个长度为n的序列,给你n-2个三元组,比如p=[1,4,2,3,5],那么三元组为[1,4,2],[4, ...
- 4. static修饰符
一.static修饰符概述 1. static修饰的成员表明它属于这个类本身,而不属于该类的单个实例 把static修饰的成员变量和方法称为类变量.类方法 2. 不使用static修饰的成员则属于该类 ...
- python的gRPC示例
参考URL: https://segmentfault.com/a/1190000015220713?utm_source=channel-hottest gRPC 是一个高性能.开源和通用的 RPC ...
- 2. java 运算符
运算符 一.算术运算符 1. 四则与取模 + - * / % ++ -- (1) 单独使用++/--,前++和后++没有任何区别. (2) 混合使用,有区别 ①如果是前++,那么变量立刻马上 +1,然 ...