我想使用命令行确定文件的位置。我试过了:
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)
无济于事。确定文件目录的命令是什么,提供它的名称?
我刚刚问了一个关于如何计算特定扩展名的文件的问题。现在我想将cp这些文件放到一个新的dir.
我在尝试,
cp *.prj ../prjshp/
Run Code Online (Sandbox Code Playgroud)
和
cp * | grep '\.prj$' ../prjshp/
Run Code Online (Sandbox Code Playgroud)
但他们给出了同样的错误,
bash: /bin/cp: 参数列表太长
我如何复制它们?
我想知道,有效使用 find 命令的最佳方法是什么?
我通常使用,find [filename] [dir]这给了我一长串文件名,它们都与我的搜索没有任何关系。
我只需要在特定目录中找到一个文件。那命令是什么?
我已经安装了一个名为 opengeo-suite 的软件包,如果没有安装,它会安装 tomcat 6。现在我在端口 8080 上运行了 apache 2.2。我想知道 tomcat 6 在哪个端口上运行?找出那个的命令是什么?
编辑
另外我如何确定它是否已启动并正在运行?
我正在关注本教程,它要求我保存proxy.cgi在/var/www/cgi-bin目录中。
中没有www名称为 的目录cgi-bin。我需要在那里创建一个目录吗?我认为本教程的指南适用于基于 RPM 的 linux 发行版,但我可能错了。
出于某种原因,当我尝试编辑时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) 好吧,这很奇怪。我正在使用此代码,
ls *.prj
Run Code Online (Sandbox Code Playgroud)
要列出目录中带有 .prj 扩展名的所有文件,但出现此错误,
bash: /bin/ls: 参数列表太长
我最终希望获得我正在使用的文件数,
ls *.prj | wc -l
但即使是这个命令也会给出同样的错误。知道我哪里出错了吗?
我正在尝试安装 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)
我该如何解决这个错误?
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