目前我使用的linux(Fedora的15),我是个试图在整个文件系统中的文件夹搜索喜欢用下面的命令如何通过终端Fedora中找到特定的文件夹
find/-name "apache-tomcat*"
的执行上面的命令正在采取越来越多的时间,用户不能等待和结果是像一些事情下面
[[email protected] fedrik]# find/-name "apache-tomcat*"
find: `/proc/6236/task/6236/ns/net': No such file or directory
find: `/proc/6236/task/6236/ns/uts': No such file or directory
find: `/proc/6236/task/6236/ns/ipc': No such file or directory
find: `/proc/6236/ns/net': No such file or directory
find: `/proc/6236/ns/uts': No such file or directory
find: `/proc/6236/ns/ipc': No such file or directory
find: `/proc/6462/task/6462/ns/net': No such file or directory
.................
.................
但正如我刚才提到它是需要长时间来处理,有时它被strucked,所以任何人都可以请让我知道如何使用ac按名称搜索特定文件夹ommand从Linux终端,这将是非常快,像上面我用'/'
编辑
其实我的目的是要搜索的文件夹类似apache-tomcat-7.0.37
在整个文件系统在整个文件系统应搜索,
例如可能有很多文件夹一样apache-tomcat-6.0.45
,apache-tomcat-5.1.7
,apache-tomcat-5.0.37
...........的不同位置上的文件系统
所以因为我们只能观察到最后一部分(这是数字部分)正在改变,整个文件夹名称是相同的,所以有没有办法搜索这些类型的文件夹,而不考虑最后一个数字部分,比如使用正则表达式或somethingl那个。
最后我的意图是要找到整个文件系统格式apache-tomcat-xxxxxxx
的文件夹,因为如果我们搜索刚刚apache-tomcat
我们将获得数百个结果,甚至数千人有时是难以分析并从中 搜索?
如果只有某种方式来过滤输出并删除不需要的结果! (这是讽刺,“男人grep”) – 2013-02-26 14:27:16