转自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-商品管理案例改进

    案例改进 vue-resource全局配置: Vue.http.options.root = 'http://vue.studyit.io/'; 全局启用 emulateJSON 选项 Vue.htt ...

  2. java基础(7):自定义类、ArrayList集合

    1. 引用数据类型(类) 1.1 引用数据类型分类 提到引用数据类型(类),其实我们对它并不陌生,如使用过的Scanner类.Random类. 我们可以把类的类型为两种: 第一种,Java为我们提供好 ...

  3. 【面试突击】-RabbitMQ常见面试题(一)

    rabbit面试题1.什么是rabbitmq采用AMQP高级消息队列协议的一种消息队列技术,最大的特点就是消费并不需要确保提供方存在,实现了服务之间的高度解耦 2.为什么要使用rabbitmq1.在分 ...

  4. Python上下文管理器的使用

    上下文管理器可以控制代码块执行前的准备动作,以及执行后的清理动作. 创建一个上下文管理器类的步骤:(1)一个__init__方法,来完成初始化(可选)(2)一个__enter__方法,来完成所有建立工 ...

  5. TCP/IP协议的分层

    T C P / I P协议族是一组不同的协议组合在一起构成的协议族.尽管通常称该协议族为 T C P / I P,但T C P和I P只是其中的两种协议而已(该协议族的另一个名字是 I n t e r ...

  6. Mysql—数据导入与导出

    数据导入 作用:把文件系统里的内容导入到数据库表中. 语法: mysql> load data infile "文件名" into table 表名 fields termi ...

  7. 5-5 可视化库Seaborn-多变量分析绘图

      Parameters:¶ 参数 解释 变量 x,y,hue 数据集变量 变量名 date 数据集 数据集名 row,col 更多分类变量进行平铺显示 变量名 col_wrap 每行的最高平铺数 整 ...

  8. 01 less的使用

    使用less 安装两个包 1===>cnpm install less less-loader --save-dev less中的注释 以 //开头的注释 不会被编译到css文件中去 以 /** ...

  9. 8.gitlab 邮件设置

    这个我没做实验.  视屏里面说的 126的 邮箱限制少点. 建议用126的 邮箱. 参考视屏  jenkins+gitlab+插件\1\7(07-gitlab备份恢复)   最后的一点部分. 需要在配 ...

  10. 二,java框架学习

    二,java框架学习 实体类的编写规则 实体类里面的属性是私有的 私有属性使用公开的set,get,方法操作 要求实体类有属性作为唯一值(一般使用id值) 实体类属性建议不使用基本数据类型,使用基本数 ...