博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Bash] View Files and Folders in Bash
阅读量:7244 次
发布时间:2019-06-29

本文共 891 字,大约阅读时间需要 2 分钟。

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

 

转载地址:http://wlybm.baihongyu.com/

你可能感兴趣的文章
vc6.0 动态工具栏按钮
查看>>
APP耗电量专项测试整理
查看>>
ffmpeg编程(二)
查看>>
xcode添加点击事件
查看>>
什么是json
查看>>
dede 日期的所有格式
查看>>
How to set a MySQL root user password in MAC OSX
查看>>
ntp.log日志梳理
查看>>
【Java例题】8.2 手工编写字符串统计的可视化程序
查看>>
山寨一个PetShop(Task003)——函数
查看>>
五.外键约束的参照操作
查看>>
走向Node与Webpack 之路 - CommonJS 模块化
查看>>
php实现随机数字、字母的验证码
查看>>
java中的包有那些 ???
查看>>
sql 加密解密函数
查看>>
[转]以下划线开头的变量名
查看>>
【转】如何通过Html网页调用本地安卓app?
查看>>
java类加载器 Bootstrap、ExtClassLoader、AppClassLoader的关系
查看>>
四、JVM垃圾回收2(垃圾收集算法)
查看>>
第五次作业
查看>>