zoukankan      html  css  js  c++  java
  • [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
  • 相关阅读:
    单元测试-伪对象、桩对象、模拟对象
    单元测试那些事
    vscode 开发go版本1.14项目
    C#中的 async await
    一手遮天 Android
    一手遮天 Android
    一手遮天 Android
    一手遮天 Android
    一手遮天 Android
    一手遮天 Android
  • 原文地址:https://www.cnblogs.com/Answer1215/p/9776015.html
Copyright © 2011-2022 走看看