[Bash] View Files and Folders in Bash
Sometimes when working at the command line, it can be handy to view a file’s contents right in the terminal, or open a file with a certain application. We’ll learn how to view files in the terminal using cat
and less
and we’ll learn how to open them with open
.
View Files:
A good command to view file:
$ less package.json
It shows only the files content without previous commands, and we can use keyboard to control the content display.
To bottom:
$ Shift + g
To top:
$ g
It also enable search content inside file easily:
/mdx
Search for "mdx" inside the file
View Folder:
Sometime when you 'cd' into a folder by using command line, you also want to open the folder to see the files:
open .
It will opens the folder in current path.
You can also use 'open' to open a file by using default IDE:
open package.json
You can also open the folder by telling to using "Webstorm":
open . -a webstorm
[Bash] View Files and Folders in Bash的更多相关文章
- [Bash] Find Files and Folders with `find` in Bash
find is a powerful tool that can not only find files but it can run a command on each matching file ...
- [Bash] Move and Copy Files and Folders with Bash
In this lesson we’ll learn how to move and rename files (mv) and copy (cp) them. Move index.html to ...
- Mac OS finder : 显示和隐藏文件[夹] show and hide files or folders
Finder默认是不显示隐藏文件[夹]的,要显示出怎么办? 要显示的话,可以GUI(graphic user interface)和CLI(command line interface)两种方式 CL ...
- Track files and folders manipulation in Windows
The scenario is about Business Secret and our client do worry about data leakage. They want to know ...
- -bash: /etc/init.d/nginx: /bin/bash^M: bad interpreter: No such file or directory
-bash: /etc/init.d/nginx: /bin/bash^M:bad interpreter: No such file or directory 这个使为了弄nginx自启的,然后在官 ...
- #VScodd集成Git Bash 命令行 #怎么把Git Bash集成到VScode
配置 Step1. File-Preferences-Setting Step2. 搜索"terminal>integrated>shell A" Step3. 找到t ...
- Bash+R: howto pass parameters from bash script to R(转)
From original post @ http://analyticsblog.mecglobal.it/analytics-tools/bashr/ In the world of data a ...
- [转]COPY OR MOVE FILES AND FOLDERS USING OLE AUTOMATION
本文转自:http://sqlindia.com/copy-move-files-folders-using-ole-automation-sql-server/ I love playing aro ...
- [Bash] Understand and Use Functions in Bash
n this lesson, we'll go over how bash functions work. Bash functions work like mini bash scripts--yo ...
随机推荐
- sysUpload.vue上传组件 的时候 看进度的时候 不要mock 注释掉 // if (process.env.NODE_ENV !== 'production') require('@/mock')
上传组件 的时候 看进度的时候 不要mock 注释掉 // if (process.env.NODE_ENV !== 'production') require('@/mock') <!-- * ...
- Node.js实现简单的爬取
学习[node.js]也有几天时间了,所以打算写着练练手:索然我作为一个后端的选手,写起来还有那么一丝熟悉的感觉.emmm~~ ‘货’不多讲 ,开搞........ 首先是依赖选择: 代码块如下: ...
- vue 页面过渡效果
App.vue 模板 <template> <div id="app"> <transition :name="transition&quo ...
- 常用mysql
搜索差价 select count(*) from gate_okex_cj; select * from (select count(*) as a_cj,coin from gate_okex_c ...
- python基础知识12-异常
几个命令: sudo apt install tree tree 当前目录以树形结构展示出来. tree a 查看a内的所有目录.也可以跟绝对路径. a = input('请输入您的密码') 将用户输 ...
- Python中比元组更好用的namedtuple
一.思考 1.什么是元组? 不可变的序列类型 "不能修改的列表" 2.元组支持哪些操作? 元组是序列类型,支持序列类型的所有操作 通过索引取值 one_tuple = (" ...
- ASP.NET MVC中如何在客户端进行必要的判断
背景:在开发网站时,往往需要对用户的输入进行合法性检查,如果验证工作都放在服务器端,势必将影响网页的响应速度,同时给用户不好的体验.本篇随笔即是使用JQuery在客户端进行必要的合法检测. JS代码如 ...
- ajax 为 select 赋值
html 页面<tr> <td class="dc-form-left">权限组:</td> <td class="dc-for ...
- Linux 命令大全 - 管理文件和目录的命令
1.pwd 显示当前目录 该命令的英文解释为print working directory(打印工作目录).输入pwd命令,Linux会输出当前目录. 2.cd 命令用来改变所在目录 cd / 转到根 ...
- 【三种负载均衡器的优缺点】LVS Nginx HAProxy
搭建负载均衡高可用环境相对简单,主要是要理解其中原理.此文描述了三种负载均衡器的优缺点,以便在实际的生产应用中,按需求取舍. 目前,在线上环境中应用较多的负载均衡器硬件有F5 BIG-IP,软件有LV ...