转自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. Java开发桌面程序学习(七)——ImageView设置图片以及jar包读取fxml文件

    ImageView设置图片 JavaFx的ImageView,设置图片不能直接通过属性设置,只能通过代码来设置 ImageView设置图片 首先,我们让fxml对应的那个controller的java ...

  2. IIS 上部署 ASP.NET Core 应用程序

    1.下载 .Net Core Runtime 和 Hosting Bundle 下载地址:https://dotnet.microsoft.com/download/dotnet-core 分别下载 ...

  3. python3的reload(sys)

    import sys reload(sys) sys.setdefaultencoding(‘utf-8’) 以上是python2的写法,但是在python3中这个需要已经不存在了,这么做也不会什么实 ...

  4. 帝国CMS系统目录结构介绍

    帝国CMS目录结构介绍 / 系统根目录├d/            附件和数据存放目录 (data)│├file/       附件存放目录│├js/         JS调用生成目录│└txt/   ...

  5. Java生鲜电商平台-深入订单拆单架构与实战

    Java生鲜电商平台-深入订单拆单架构与实战 Java生鲜电商中在做拆单的需求,细思极恐,思考越深入,就会发现里面涉及的东西越来越多,要想做好订单拆单的功能,还是相当有难度, 因此总结了一下拆单功能细 ...

  6. HTTP面试常见题

    1.HTTP2.0.1.1.1.0.0.9的区别? 答:HTTP0.9:是HTTP协议的第一个版本,只允许发送get请求,并且不支持请求头.一次请求对应一次响应.是短连接. HTTP1.0:相比于0. ...

  7. docker网络之(三)

    docker4种网络 基于docker run创建容器时,可以使用--net选项指定容器的网络模式:Docker默认有以下4种网络模式: host模式,使用--net=host指定 container ...

  8. OpenGL实例:纹理映射

    OpenGL实例:纹理映射 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 更多请查看:计算机图形学 1. 介绍 用于指定一维.二维和三维纹理的函数分别 ...

  9. 2018年蓝桥杯A组C/C++决赛题目

    2018年蓝桥杯A组C/C++决赛题目 2018年蓝桥杯A组C/C++决赛题解     1:三角形面积 已知三角形三个顶点在直角坐标系下的坐标分别为: (2.3, 2.5) (6.4, 3.1) (5 ...

  10. Html学习之十三(导航栏的制作)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...