转自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. Django 全局log process_exception中间件

    class BaseResp: # 基础的返回值类 def __init__(self, code, msg, data): self.code = code self.msg = msg self. ...

  2. 重新认识快速视图窗体(Quick View Form)

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复158或者20151009可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 在我的 微软Dynamics C ...

  3. git零基础快速入门实战,重点讲解,在实际生产中整合idea对版本、分支的管理等

    1.什么是版本管理 (多人协作)项目中常见的问题: 代码放在什么地方 ?? 同步(到服务器),代码的冲突问题 ?? 服务器访问权限问题 ?? (代码)服务器内容修改的细节 ?? 项目版本的发布 ?? ...

  4. TCP/IP协议的分层

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

  5. Linux PXE + Kickstart 自动装机

    大规模装机时,使用无人值守装机便可大大简便人工操作,提高效率. PXE 网络安装 配置双网卡 这里ens33为nat网络,ens37为仅主机网络,配置ens37 [root@localhost ~]# ...

  6. Mysql—事务原理与详解

    事务的四大特性 事务的隔离级别 https://www.cnblogs.com/57rongjielong/p/8036418.html https://blog.csdn.net/zwq123211 ...

  7. [PHP] 运维新增服务器导致的附件上传失败问题

    现象:客服反馈webmail发信上传附件时,报错提示上传失败,发信时提示发送失败前因:运维同事新增加了三台服务器 1.服务器上有一个挂载的公共目录,该目录是存储的上传后的附件文件.该路径是通过一个软链 ...

  8. C学习笔记(2)---各类函数

    1.函数(function)声明定义: 见例子,不复述:https://www.runoob.com/cprogramming/c-functions.html 2. 函数参数(Parameters“ ...

  9. 线段树set,add基础

    UVA11992 Fast Matrix Operations https://www.luogu.org/problem/UVA11992 此类模板题建议随便打打就行了233....

  10. jacoco统计自动化代码覆盖率

    jacoco统计自动化代码覆盖率 1. 简介 1.1. 什么是Jacoco Jacoco是一个开源的代码覆盖率工具,可以嵌入到Ant .Maven中,并提供了EclEmma Eclipse插件,也可以 ...