小编Gap*_*pry的帖子

如何创建短路径?

我们有很多有用的文件夹,它们位于不同的路径中,用于我们在 Linux 中的工作。

例如 :

  1. $ cd ~/Documents/Courses/EDX/physics2013/
  2. $ cd ~/Documents/Company/OpenGL/Proj/...
  3. $ cd ~/Documents/Freelance/Android/Proj/...

....

如何创建一些可以使用的短路径

  1. $ cd edxPhy2013
  2. $ cd cglProj-v-2.13
  3. $ cd flAndrProj-v-1.1

shell directory alias cd-command

8
推荐指数
1
解决办法
7125
查看次数

如何在命令行中使用 grep 结果?

当我grep用来查找一些我需要的文本时,它会显示包含与给定模式匹配的行。

例如,

# grep -r ".*Linux" *
path0/output.txt:I hope you enjoyed working on Linux.
path1/output1.txt:Welcome to Linux.
path2/output2.txt:I hope you will have fun with Linux.
Run Code Online (Sandbox Code Playgroud)

然后,我想编辑文件path2/output2.txt,因此,我输入vim path2/output2.txt.

但是,我认为这不是一种有效的方法。

之后如何复制路径grep

grep bash

3
推荐指数
2
解决办法
6874
查看次数

标签 统计

alias ×1

bash ×1

cd-command ×1

directory ×1

grep ×1

shell ×1