[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 ...
随机推荐
- import downloadjs from 'downloadjs' 如果是自己写的函数 没用默认导出 记得加花括号 例如 import { download } from './data.js'
import downloadjs from 'downloadjs' 如果是自己写的函数 没用默认导出 记得加花括号 例如 import { download } from './data.js'
- HNOI2006 花仙子的魔法
题目描述 题解: 考试的时候手画打表,然后半个小时磨了个式子:$$f[i][j]=f[i-1][j-1]+f[i][j-1]$$ 交上去$A$的时候都蒙了. 考后才知道原因. 考虑$n$维空间内原来有 ...
- [JOYOI] 1124 花店橱窗
题目限制 时间限制 内存限制 评测方式 题目来源 1000ms 131072KiB 标准比较器 Local 题目背景 xq和他的老婆xz最近开了一家花店,他们准备把店里最好看的花都摆在橱窗里.但是他们 ...
- 删除mysql中user为空用户,mysql空密码
进入mysql数据库 mysql -uroot -p 查看用户信息 select user,host ,Password from mysql.user; 如下图: 删除user为空用户 delete ...
- Centos7 安装 MySQL8以及远程访问的配置
Centos7 安装MySQL8 1. 添加MySQL8的本地源 执行以下命令获取安装MySQL源 [root@virde ~]# wget https://repo.mysql.com//mysql ...
- InnoDB INFORMATION_SCHEMA Tables about Compression
InnoDB INFORMATION_SCHEMA Tables about Compression 了解关于压缩的InnoDB INFORMATION_SCHEMA表,可以深入了解压缩的整体运行情况 ...
- LeetCode 464. Can I Win
In the "100 game," two players take turns adding, to a running total, any integer from 1.. ...
- zoj 2857 Image Transformation
Image Transformation Time Limit: 2 Seconds Memory Limit: 65536 KB The image stored on a compute ...
- [HNOI2004]宠物收养场(Treap)
洛谷传送门 这题真是恶心,一开始没理解题意. 原来如果有狗,狗就会存在收养场中,直到有人来领养: 如果有人,人也会存在收养场中,直到有狗来被领养. 就是建一个treap,狗来把狗插进去,人来后把狗领养 ...
- 转载:shell脚本之前的基础知识
转载地址:http://www.92csz.com/study/linux/12.htm 第十二章 学习 shell脚本之前的基础知识 日常的linux系统管理工作中必不可少的就是shell脚本,如果 ...