小编Sam*_*007的帖子

使用命令行按名称查找文件

我想使用命令行确定文件的位置。我试过了:

find . -type f -name "postgis-2.0.0"
Run Code Online (Sandbox Code Playgroud)

locate postgis-2.0.0
Run Code Online (Sandbox Code Playgroud)

无济于事。确定文件目录的命令是什么,提供它的名称?

command-line directory find

241
推荐指数
6
解决办法
100万
查看次数

复制文件时参数列表太长

我刚刚问了一个关于如何计算特定扩展名的文件的问题。现在我想将cp这些文件放到一个新的dir.

我在尝试,

cp *.prj ../prjshp/
Run Code Online (Sandbox Code Playgroud)

cp * | grep '\.prj$' ../prjshp/
Run Code Online (Sandbox Code Playgroud)

但他们给出了同样的错误,

bash: /bin/cp: 参数列表太长

我如何复制它们?

command-line files

37
推荐指数
3
解决办法
6万
查看次数

如何更有效地使用 find 命令?

我想知道,有效使用 find 命令的最佳方法是什么?

我通常使用,find [filename] [dir]这给了我一长串文件名,它们都与我的搜索没有任何关系。

我只需要在特定目录中找到一个文件。那命令是什么?

command-line find

15
推荐指数
1
解决办法
5万
查看次数

tomcat 6 在哪个端口上运行

我已经安装了一个名为 opengeo-suite 的软件包,如果没有安装,它会安装 tomcat 6。现在我在端口 8080 上运行了 apache 2.2。我想知道 tomcat 6 在哪个端口上运行?找出那个的命令是什么?

编辑

另外我如何确定它是否已启动并正在运行?

apache2 tomcat6

14
推荐指数
1
解决办法
10万
查看次数

找不到 cgi-bin 目录

我正在关注本教程,它要求我保存proxy.cgi/var/www/cgi-bin目录中。

中没有www名称为 的目录cgi-bin。我需要在那里创建一个目录吗?我认为本教程的指南适用于基于 RPM 的 linux 发行版,但我可能错了。

directory

10
推荐指数
1
解决办法
4万
查看次数

当'vi'报告它已经打开时如何打开文件?

出于某种原因,当我尝试编辑时vi .profile,终端一直告诉我我已经在编辑模式下拥有 .profile 。

E325: ATTENTION
Found a swap file by the name ".profile.swp"
          owned by: smaranh   dated: Fri Apr  6 09:46:45 2012
         file name: ~smaranh/.profile
          modified: YES
         user name: smaranh   host name: ubuntu
        process ID: 4394
While opening file ".profile"
             dated: Fri Apr 27 10:35:32 2012
      NEWER than swap file!

(1) Another program may be editing the same file.  If this is the case,
    be careful not to end up with two different instances of the same …
Run Code Online (Sandbox Code Playgroud)

text-editor vi

10
推荐指数
1
解决办法
3万
查看次数

列出特定扩展名的文件

好吧,这很奇怪。我正在使用此代码,

ls *.prj
Run Code Online (Sandbox Code Playgroud)

要列出目录中带有 .prj 扩展名的所有文件,但出现此错误,

bash: /bin/ls: 参数列表太长

我最终希望获得我正在使用的文件数,

ls *.prj | wc -l

但即使是这个命令也会给出同样的错误。知道我哪里出错了吗?

file-format ls

6
推荐指数
2
解决办法
5万
查看次数

无法解压 libgdal

我正在尝试安装 opengeo-suite,似乎由于某种原因,我无法安装,因为 libgdal 无法解压。

这是我每次执行时得到的错误 apt-get install opengeo-suite

Unpacking libgdal (from .../libgdal_1.8.1-1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libgdal_1.8.1-1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/gdal-config', which is also in package libgdal-dev 1.9.0-1~exp5p1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Run Code Online (Sandbox Code Playgroud)

......

Unpacking opengeo-suite (from .../opengeo-suite_2.5_amd64.deb) ...
    Processing triggers for man-db ...
    Errors were encountered while processing:
     /var/cache/apt/archives/libgdal_1.8.1-1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个错误?

apt

5
推荐指数
1
解决办法
1217
查看次数

标签 统计

command-line ×3

directory ×2

find ×2

apache2 ×1

apt ×1

file-format ×1

files ×1

ls ×1

text-editor ×1

tomcat6 ×1

vi ×1