转自Github/Powershell

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对比的更多相关文章

  1. PowerShell与Unix Shell对比:八大实例

    PowerShell与Unix Shell对比:八大实例 本文将从八个实例对比PowerShell和Unix Shell,通常是Linux Bourne Shell(包括sh.ksh和bash等).二 ...

  2. Linux Bash命令杂记(tr col join paste expand)

    Linux Bash命令杂记(tr col join paste expand) tr命令 tr命令可以将输入的数据中的某些字符做替换或者是作删除 tr [-ds] STR d: 删除输入数据的中的S ...

  3. 转: windows 10使用原生linux bash命令行

    转: https://www.zybuluo.com/pandait/note/337430 windows 10使用原生linux bash命令行 linux bash windows-10 第一时 ...

  4. Linux Bash代码 利用for循环实现命令的多次执行

    Linux Bash代码 [yuanhao15@lu01 libsvm-rank-2.81]$ for ((i=0; i<=19; i++)) do ./svm-train -s 5 -c 10 ...

  5. linux BASH shell设置字体与背景颜色

    linux BASH shell下设置字体及背景颜色的方法. BASH shell下设置字体及背景颜色  echo -e "\e[31mtest\e[41m"  \e[30m 将字 ...

  6. Linux:-bash: ***: command not found

    Linux:-bash: ***: command not found,系统很多命令都用不了,均提示没有此命令. 突然之间linux很多命令都用不了,均提示没有此命令. 这应该是系统环境变量出现了问题 ...

  7. Linux Bash命令关于程序调试详解

    转载:http://os.51cto.com/art/201006/207230.htm 参考:<Linux shell 脚本攻略>Page22-23 Linux bash程序在程序员的使 ...

  8. 禁用Linux bash rm --force

    防止无意的Linux bash rm --force 二.禁用rm -rf 因为rm -rf 删除文件的时候,经常会不小心将系统文件或者多个有用的目录删除掉.有两种方法:1,每次删除都用-i(inte ...

  9. linux bash关闭标准输出1(exec 1<&-)后重新打开

    linux bash shell的再次学习. 文件描述符: stdin,stdout 和 stderr 的文件描述符分别是 0,1 和 2(一个文件描述符说白了就是文件系统为了跟踪这个打开的文件而分配 ...

随机推荐

  1. 在Vue中使用i18n 国际化遇到 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

    最近用Vue在搭建前端框架,在引用i18n时,运行的时候报错:Uncaught TypeError: Cannot assign to read only property 'exports' of ...

  2. 获取给定地址中的域名,substring()截取

    package seday01;/** * 获取给定地址中的域名 * @author xingsir */public class Test { public static void main(Str ...

  3. JS基础语法---函数练习part2---10个综合练习(运用:循环/数组/函数)

    练习1:求2个数中的最大值 function getMax(num1, num2) { return num1 > num2 ? num1 : num2; } console.log(getMa ...

  4. echarts水球图编写

    // 前提条件 需要引入这个插件<script src="./echarts-liquidfill.min.js"></script> // 代码 let ...

  5. uni-app学习(四)好用的插件2

    1. uni-app学习(四)好用的插件2 1.1. 树形结构 点击这里 1.2. 下拉刷新上拉加载组件 如果想把下拉上拉做成自定义的,更加好看,可以使用这个插件 地址这里 举个例子 1.3. 浮动键 ...

  6. Dynamics 365 We API ODATA语法根据父记录查询子记录,根据子记录查询父记录(附上根据团队,队列名称查成员)

    微软动态CRM专家罗勇 ,回复333或者20190508可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me! 先举个N:N关系的例子.这里以根据团队的名称查找其所有团队成员的 ...

  7. Android框架Volley之:利用Imageloader和NetWorkImageView加载图片

    首先我们在项目中导入这个框架: implementation 'com.mcxiaoke.volley:library:1.0.19' 在AndroidManifest文件当中添加网络权限: < ...

  8. xcode 左边导航栏中,类文件后面的标记“A”,"M","?"……等符号的含义???

        "M" = Locally modified     "U" = Updated in repository   "A" = Loc ...

  9. [Linux]gocron定时任务平台的部署

    采用二进制文件的方式部署非常简单,因为go已经把源码打包成了可执行文件,下载下来直接运行就可以了,不需要自己去编译和配置依赖 下载执行文件的地址是:https://github.com/ouqiang ...

  10. Lnmp架构部署动态网站环境.2019-7-2-1.1

    一.Mysql简介 Mysql数据库: 1.社区版 2.商业版 3.cluster集群 Mysql安装方式 1.编译安装 2.yum/rpm 3.二进制包,直接解压,无需编译 二.Mysql安装部署 ...