我在找一个脚本,工具...对于linux,它可以找到所有文件和所有文件中的关键字,类似于OSX Finder (我不是在寻找具有相同Finder界面的应用程序,而只是相同的工作)
例如,如果我在OSX Finder中搜索"linux“,我会得到:
linux (directory with linux name)
linux-2.4.0 (directory with linux in name)
...
memory.h (file with linux in text)
...
command.c (file with linux in text)
...
so-08-filesy
我有多个命名相似的文件。他们名字的不同只是一个递增的数字。例如linux内核:
rc linux-image-3.2.0-29-generic 3.2.0-29.46 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-31-generic 3.2.0-31.50 Linux kernel image for version 3.2.0 on
我的文件包含以下几行
File.txt
Unix is good
Linux and unix is different?
Linux is also good, then what about unix?
这里我要输出
(1st line blank)
Linix and
Linux is also good, then what about
在这里vi命令或任何其他命令都会给出这个输出?搜索特定的单词,如果这是对的话,然后删除那个词,然后删除该行中的所有单词。
我在Linux Command Line and Shell Scripting Bible by Richard Blum Christine Bresnahan上读到:
从对象的完全权限集中减去umask值。文件的完全权限为模式666,但对于目录则为777。
因此,如果一个文件不能同时具有读、写、执行权限,那么用户每次需要执行操作时都必须更改文件吗?如果一个程序员需要测试他的代码,他应该怎么做?其他类型的文件呢?提前谢谢。