[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 ...
随机推荐
- c++调用com口操作autocad
#include "stdafx.h" #include <atlcomcli.h> #import "D:\\C++test\\FirstCom\\Rele ...
- 32位和64位系统下 int、char、long、double所占的内存
32位和64位系统下 int.char.long.double所占内存
- JavaSE-03 Java选择结构
学习要点 if选择结构 switch选择结构 if选择结构 单分支if选择结构 语法结构 应用场合 问题:如果王小强的Java考试成绩大于98分,小强就能获得一个iphone8作为奖励. 复杂条件下的 ...
- JS 数组间的操作
JS 数组间的操作(交集,并集.差集) 以下是js数组之间常用的操作,如交集,并集.差集等. 迭代 each是一个集合迭代函数,可以将一个函数作为参数和一组可以选的参数.依次将集合的每一个元素和可选参 ...
- Git Bash Windows客户端乱码
最近升级Git后,打开Git Bash出现了乱码,解决方法是: 注意,我升级之后,本地和字符集栏位出现了空白的情况.如果检查这里为空白,那么把本地设置为zn_CN,字符集设置为UTF-8
- 查询SYS_ORG_TB树的层级
WITH N(SYS_ORG_ID,SYS_ORG_NAME,LEVEL) AS( AS LEVEL FROM SYS_ORG_TB WHERE SYS_ORG_UPID IS NULL UNION ...
- 【JDBC-MVC模式】开发实例
JDBC - 开发实例-MVC模式 1. 在web.xml中配置连接数据库的信息 web.xml: <context-param> <param-name>server< ...
- php函数之数组
关联数组 isset bool isset( mixed $val [, mix $...]) 变量是否已设置并且非null.多个参数从左到右计算. 判断null $a=null;var_dump(i ...
- CSS3---关于文本
1.text-overflow用来设置是否使用一个省略标记(...)标示对象内文本的溢出. 2.但是text-overflow只是用来说明文字溢出时用什么方式显示,要实现溢出时产生省略号的效果,还须定 ...
- LINUX:关于Redis集群搭建 、和搭建项目中遇到的问题
文章来源:http://www.cnblogs.com/hello-tl/p/7804225.html 0.Redis的简单安装 1.安装redis依赖 # yum install gcc tcl g ...