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(一个文件描述符说白了就是文件系统为了跟踪这个打开的文件而分配 ...
随机推荐
- Modbus RTU通信协议详解以及与Modbus TCP通信协议之间的区别和联系
Modbus通信协议由Modicon公司(现已经为施耐德公司并购,成为其旗下的子品牌)于1979年发明的,是全球最早用于工业现场的总线规约.由于其免费公开发行,使用该协议的厂家无需缴纳任何费用,Mod ...
- wpf button style IsMouseOver
<Style x:Key="workButtonStyle" TargetType="{x:Type Button}"> <Style.Tri ...
- hello tensorflow,我的第一个tensorflow程序
上代码: import tensorflow as tf if __name__=='__main__': g = tf.Graph() # add ops to the user created g ...
- Hive表导出成csv文件
命令 hive -e " set hive.cli.print.header=true; #将表头输出 select * from data_table where some_query_c ...
- go-gui-控件和信号
go-gui-控件和信号 控件 控件简介 控件是对数据和方法的封装.控件有自己的属性和方法.属性是指控件的特征.方法是指控件的一些简单而可见的功能.如按钮就是一个控件,这个按钮是方形的,里面有张图片, ...
- Oracle 中Number的长度定义
Number可以通过如下格式来指定:Field_NAME Number(precision ,scale),其中precision指Number可以存储的最大数字长度(不包括左右两边的0),scale ...
- centos 安装gitlab
1.开始安装依赖软件:yum -y install policycoreutils openssh-server openssh-clients postfix 2.设置postfix开机自启动,po ...
- Javase之多线程(1)
多线程(1) 多线程的概述 了解多线程之前需要先了解线程,而线程依赖于进程而存在,所以先了解进程. 什么是进程 进程就是正在运行的程序.是系统进行资源分配和调用的独立单位.每一个进程都有它自己的内存空 ...
- 关于在 ASP.NET 的 Global.asax 中 Application_Error 方法内,设置跳转到自定义错误页无效的问题
转自:https://www.cnblogs.com/OpenCoder/p/5070645.html 在 Global.asax 中的 Application_Error 方法中,使用 Respon ...
- Linux 下Postgresql 命令:
关闭:service postgresql stop 启动:service postgresql start 启动数据库:pg_ctl start -D /data/postgres 重启数据库: p ...