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的更多相关文章

  1. [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 ...

  2. [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 ...

  3. Mac OS finder : 显示和隐藏文件[夹] show and hide files or folders

    Finder默认是不显示隐藏文件[夹]的,要显示出怎么办? 要显示的话,可以GUI(graphic user interface)和CLI(command line interface)两种方式 CL ...

  4. 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 ...

  5. -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自启的,然后在官 ...

  6. #VScodd集成Git Bash 命令行 #怎么把Git Bash集成到VScode

    配置 Step1. File-Preferences-Setting Step2. 搜索"terminal>integrated>shell A" Step3. 找到t ...

  7. 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 ...

  8. [转]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 ...

  9. [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 ...

随机推荐

  1. centos7 install vim8

    centos7 install vim8 Git and dependency Git: https://github.com/vim/vim # yum install -y perl-devel ...

  2. mysql中ibatis的limit动态传参

    param.put("pageNo",pageNo);   param.put("pageSize",pageSize); sqlMap中的用法 limit $ ...

  3. jquery 拖动(Draggable) 约束运动,输出数组排序Array

    <!doctype html><html lang="en"><head> <meta charset="utf-8" ...

  4. redis:哨兵集群配置

    最少配置1主2从3哨兵 一.引言 上一篇文章我们详细的讲解了Redis的主从集群模式,其实这个集群模式配置很简单,只需要在Slave的节点上进行配置,Master主节点的配置不需要做任何更改,但是有一 ...

  5. HTML5结构

    1.显示编排内容区域块(明确使用section等元素创建文档结构,在每个区域块中使用标题元素) 2.隐示编排内容区域块(不明确使用section等元素,而是根据网页需求来将各级的元素创建出来) 3.标 ...

  6. 比特币 3角对冲python代码

    3角对冲原理 基础货币 base, 兑换货币 quote, 中间货币 mid. 市场分为3个市场 p3: base_quote p2: quote_mid p1: quote_mid 代码逻辑 1, ...

  7. tiny4412学习笔记-将uboot、zImage、文件系统烧到emmc中 (转)

    http://blog.chinaunix.net/uid-30025978-id-4788683.html 1.首先还是要将u-boot写入SD卡中从SD卡启动. 使用读卡器将SD插入电脑中,使用u ...

  8. python测试工具

    https://wiki.python.org/moin/PythonTestingToolsTaxonomy mac pip安装 https://blog.csdn.net/ywj_486/arti ...

  9. 一张图表,人人都能建立自己的AARRR运营模型

    每次跟同行聊运营,聊用户,聊产品,最后都会回到AARRR模型上来,这个用户全生命周期模型概括了互联网产品运营的5个关键环节. 获客是运营的基础,促进用户活跃才能让产品有生命力,提升留存减少流失让用户规 ...

  10. 在WinForm里嵌入WPF模拟公交运行状态

    公司有个公交项目,模拟公交运行的时候使用的纯WinForm技术,5秒钟刷新一次,不仅看起来感觉很丑,而且性能上很有问题,听说一段时间后就会因为内存问题崩溃(估计是没释放非托管资源吧,不断重绘,非托管资 ...