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(一个文件描述符说白了就是文件系统为了跟踪这个打开的文件而分配 ...
随机推荐
- 【随笔】CLR:向头对象(Object Header)迈进一大步!!!
前言 在我之前一篇随笔里(戳我),我们知道,一个引用类型的对象,包含了2个额外的开销,一个是头对象(object header),一个是MT.我们接下来看看头对象到底有多神秘... Object He ...
- ReSharper激活方法
激活方式选择License Keys. 激活码: MTW881U3Z5-eyJsaWNlbnNlSWQiOiJNVFc4ODFVM1o1IiwibGljZW5zZWVOYW1lIjoiTnNzIElt ...
- springBoot 集成Mysql数据库
springBoot 集成Mysql数据库 前一段时间,我们大体介绍过SpringBoot,想必大家还有依稀的印象.我们先来回顾一下:SpringBoot是目前java世界最流行的一个企业级解决方案框 ...
- 易优CMS:关于assign你知道多少
[基础用法] 名称:assign 功能:模板文件中定义变量,可在其他标签里使用该变量 语法: {eyou:assign name='typeid' value='5' /} 文件: 无 参数: nam ...
- RPA之AA
RoboticProcessAutomation(即机器人流程自动化),RPA机器人能够模仿大多数人类用户的行为, 比如可以登录应用程序,移动文件和文件夹,复制和粘贴数据,填写表单,从文档中提取结构化 ...
- mysql操作数据表
目录 创建数据表 列约束 查看数据表结构 列类型(字段类型) 整型 浮点型 字符串 时间日期类型 Date Time Datetime Timestamp Year 枚举enum 修改表名 增加字段 ...
- 必学PHP类库/常用PHP类库大全,php 类库分类-收集
依赖管理( Dependency Management ) 用于依赖管理的包和框架 Composer / Packagist - 一个包和依赖管理器. Composer Installers - 一个 ...
- cpu 乱序执行与问题【转】
转自:https://blog.csdn.net/lizhihaoweiwei/article/details/50562732 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议 ...
- C++中的传值与传址
在指针的传递中,也涉及到传值与传址的问题.下面通过一个函数进行说明. 代码如下: bool openBinary(uchar* buffer) { ; buffer = (uchar*)malloc( ...
- 【bzoj4006】[JLOI2015]管道连接(斯坦纳树+dp)
题目链接 题意: 给出\(n\)个点,\(m\)条边,同时给出\(p\)个重要的点以及对应特征. 现在要选出一些边,问使得这\(p\)个所有特征相同的点相连,问最小代价. 思路: 斯坦纳树的应用场景一 ...