Translation

(itstool) path: listitem/screen
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make search name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
Maint: ler@lerctr.org
Index: sysutils
B-deps:
R-deps:
296/2960
Context English Chinese (Simplified) (zh_CN) State
Dan Langille maintains <link xlink:href="http://www.FreshPorts.org/">FreshPorts.org</link> which provides a comprehensive search utility and also tracks changes to the applications in the Ports Collection. Registered users can create a customized watch list in order to receive an automated email when their watched ports are updated. Dan Langille 维护着网站 FreshPorts,在 <uri xlink:href="http://www.FreshPorts.org/">http://www.FreshPorts.org/</uri>。 FreshPort时刻 <quote>追踪</quote> 着在 ports 中应用程序的变化。当有任何程序被升级时,他们就会发 email 提醒您。
<primary>SourceForge</primary> <primary>SourceForge</primary>
If finding a particular application becomes challenging, try searching a site like <link xlink:href="http://www.sourceforge.net/">SourceForge.net</link> or <link xlink:href="http://www.github.com/">GitHub.com</link> then check back at the <link xlink:href="@@URL_RELPREFIX@@/ports/index.html">FreeBSD site</link> to see if the application has been ported. 如果找到特定的应用程序比较困难,请尝试在 <link xlink:href="http://www.sourceforge.net/">SourceForge.net</link>或<link xlink:href="http://www.github.com/">GitHub.com</link>上搜索,然后在<link xlink:href="@@URL_RELPREFIX@@/ports/index.html">FreeBSD site</link>查看应用程序是否已被移植。
<primary>pkg</primary> <secondary>search</secondary> <primary>pkg</primary> <secondary>搜索</secondary>
To search the binary package repository for an application: 使用下列命令搜索 pkg 中的软件包:
<prompt>#</prompt> <userinput>pkg search <replaceable>subversion</replaceable></userinput>
git-subversion-<replaceable>1.9.2</replaceable>
java-subversion-<replaceable>1.8.8_2</replaceable>
p5-subversion-<replaceable>1.8.8_2</replaceable>
py27-hgsubversion-<replaceable>1.6</replaceable>
py27-subversion-<replaceable>1.8.8_2</replaceable>
ruby-subversion-<replaceable>1.8.8_2</replaceable>
subversion-<replaceable>1.8.8_2</replaceable>
subversion-book-<replaceable>4515</replaceable>
subversion-static-<replaceable>1.8.8_2</replaceable>
subversion16-<replaceable>1.6.23_4</replaceable>
subversion17-<replaceable>1.7.16_2</replaceable>
<prompt>#</prompt> <userinput>pkg search <replaceable>subversion</replaceable></userinput>
git-subversion-<replaceable>1.9.2</replaceable>
java-subversion-<replaceable>1.8.8_2</replaceable>
p5-subversion-<replaceable>1.8.8_2</replaceable>
py27-hgsubversion-<replaceable>1.6</replaceable>
py27-subversion-<replaceable>1.8.8_2</replaceable>
ruby-subversion-<replaceable>1.8.8_2</replaceable>
subversion-<replaceable>1.8.8_2</replaceable>
subversion-book-<replaceable>4515</replaceable>
subversion-static-<replaceable>1.8.8_2</replaceable>
subversion16-<replaceable>1.6.23_4</replaceable>
subversion17-<replaceable>1.7.16_2</replaceable>
Package names include the version number and, in the case of ports based on python, the version number of the version of python the package was built with. Some ports also have multiple versions available. In the case of <application>Subversion</application>, there are different versions available, as well as different compile options. In this case, the statically linked version of <application>Subversion</application>. When indicating which package to install, it is best to specify the application by the port origin, which is the path in the ports tree. Repeat the <command>pkg search</command> with <option>-o</option> to list the origin of each package: 软件包名字中带有版本号。如果这个软件使用 Python 写的,包名中还会包含软件使用的 Python 版本号。一些软件可能会有很多个版本。以<application>Subversion</application>为例,就有许多不同的版本,还有不同的编译参数。在本例中,静态链接的<application>Subversion</application>版本。指示要安装哪个包时,最好按 Port 源指定应用程序,Port 源是 Port 树中的路径。使用 <command>pkg search -o</command> 列出每个包的来源:
<prompt>#</prompt> <userinput>pkg search -o <replaceable>subversion</replaceable></userinput>
devel/git-subversion
java/java-subversion
devel/p5-subversion
devel/py-hgsubversion
devel/py-subversion
devel/ruby-subversion
devel/subversion16
devel/subversion17
devel/subversion
devel/subversion-book
devel/subversion-static
<prompt>#</prompt> <userinput>pkg search -o <replaceable>subversion</replaceable></userinput>
devel/git-subversion
java/java-subversion
devel/p5-subversion
devel/py-hgsubversion
devel/py-subversion
devel/ruby-subversion
devel/subversion16
devel/subversion17
devel/subversion
devel/subversion-book
devel/subversion-static
Searching by shell globs, regular expressions, exact match, by description, or any other field in the repository database is also supported by <command>pkg search</command>. After installing <package>ports-mgmt/pkg</package> or <package>ports-mgmt/pkg-devel</package>, see <citerefentry><refentrytitle>pkg-search</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more details. <command>pkg search</command>支持使用 Shell 通配符(globs)、正则表达式、描述或文件库中的其他其他内容。在安装<package>ports-mgmt/pkg</package>或<package>ports-mgmt/pkg-devel</package>之后,可参考<citerefentry><refentrytitle>pkg-search</refentrytitle><manvolnum>8</manvolnum></citerefentry> 以取得更多详细信息。
If the Ports Collection is already installed, there are several methods to query the local version of the ports tree. To find out which category a port is in, type <command>whereis <replaceable>file</replaceable></command>, where <replaceable>file</replaceable> is the program to be installed: 若 Port 软件集已安装,有数个方法可以查询 Port 树中的本地版本。要找到 Port 所在的分类,可输入<command>whereis <replaceable>file</replaceable></command>,其中<replaceable>file</replaceable>是要安装的程序:
<prompt>#</prompt> <userinput>whereis lsof</userinput>
lsof: /usr/ports/sysutils/lsof
<prompt>#</prompt> <userinput>whereis lsof</userinput>
lsof: /usr/ports/sysutils/lsof
Alternately, an <citerefentry><refentrytitle>echo</refentrytitle><manvolnum>1</manvolnum></citerefentry> statement can be used: 或使用<citerefentry><refentrytitle>echo</refentrytitle><manvolnum>1</manvolnum></citerefentry>:
<prompt>#</prompt> <userinput>echo /usr/ports/*/*lsof*</userinput>
/usr/ports/sysutils/lsof
<prompt>#</prompt> <userinput>echo /usr/ports/*/*lsof*</userinput>
/usr/ports/sysutils/lsof
Note that this will also return any matched files downloaded into the <filename>/usr/ports/distfiles</filename> directory. 请注意,这也会显示已下载至<filename>/usr/ports/distfiles</filename>目录中任何已符合条件的文件。
Another way to find software is by using the Ports Collection's built-in search mechanism. To use the search feature, <application>cd</application> to <filename>/usr/ports</filename> then run <command>make search name=program-name</command> where <replaceable>program-name</replaceable> is the name of the software. For example, to search for <command>lsof</command>: 另一个方法是使用 Port 套件集内置的搜寻机制来找软件。要使用搜寻的功能需先<application>cd</application>到<filename>/usr/ports</filename>然后执行<command>make search name=program-name</command>,其中<replaceable >program-name</replaceable>代表软件的名称。举例搜索<command>lsof</command>:
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make search name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
Maint: ler@lerctr.org
Index: sysutils
B-deps:
R-deps:
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make search name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
Maint: ler@lerctr.org
Index: sysutils
B-deps:
R-deps:
The built-in search mechanism uses a file of index information. If a message indicates that the <filename>INDEX</filename> is required, run <command>make fetchindex</command> to download the current index file. With the <filename>INDEX</filename> present, <command>make search</command> will be able to perform the requested search. 内置的搜索机制会使用索引文件内的信息。若出现信息指出需要<filename>INDEX</filename>档,可执行<command>make fetchindex</command>来下载最新的索引文件。当<filename>INDEX</filename>文件存在时,<command>make search</command>方可执行请求的搜索动作。
The <quote>Path:</quote> line indicates where to find the port. <quote>Path:</quote>此行代表Port的所在位置。
To receive less information, use the <command>quicksearch</command> feature: 若不要接受这么多信息,可使用<command>quicksearch</command>功能:
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make quicksearch name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make quicksearch name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
For more in-depth searching, use <command>make search key=<replaceable>string</replaceable></command> or <command>make quicksearch key=<replaceable>string</replaceable></command>, where <replaceable>string</replaceable> is some text to search for. The text can be in comments, descriptions, or dependencies in order to find ports which relate to a particular subject when the name of the program is unknown. 若要进行更有深度的搜索,使用<command>make search key=<replaceable>string</replaceable></command>或<command>make quicksearch key=<replaceable>string</replaceable></command>其中<replaceable>string</replaceable>是要搜索的文字。该文字可以是一部份的注释、描述或相依套件,当不清楚程序的名称时可以找到与特定主题相关的Port。
search search
quicksearch quicksearch
When using <_:buildtarget-1/> or <_:buildtarget-2/>, the search string is case-insensitive. Searching for <quote>LSOF</quote> will yield the same results as searching for <quote>lsof</quote>. 当使用<_:buildtarget-1/>或 <_:buildtarget-2/>时,搜索的字串不分大小写。搜索<quote>LSOF</quote>会与搜索<quote>lsof</quote>产生相同的结果。
Using <application>pkg</application> for Binary Package Management 使用<application>pkg</application>管理二进制套件
<application>pkg</application> is the next generation replacement for the traditional FreeBSD package management tools, offering many features that make dealing with binary packages faster and easier. <application>pkg</application>是新一代套件管理工具用来取代旧版工具,提供许多功能让处理二进制套件更快更简单。
For sites wishing to only use prebuilt binary packages from the FreeBSD mirrors, managing packages with <application>pkg</application> can be sufficient. 对于只想要使用在FreeBSD镜像站上预先编译Binary套件的站台,使用<application>pkg</application>管理套件便已足够。
However, for those sites building from source or using their own repositories, a separate <link linkend="ports-upgrading-tools">port management tool</link> will be needed. 但是,对于那些想要从源码或使用自己的文件库编译的站台,则会需要<link linkend="ports-upgrading-tools">Port管理工具</link>。
Since <application>pkg</application> only works with binary packages, it is not a replacement for such tools. Those tools can be used to install software from both binary packages and the Ports Collection, while <application>pkg</application> installs only binary packages. 因为<application>pkg</application>仅能管理Binary套件,所以不能当做为替代Port管理工具,这些工具可用来安装来自Binary与Port套件集的软件,而<application>pkg</application>仅能安装Binary套件。
Getting Started with <application>pkg</application> 开始使用<application>pkg</application>
FreeBSD includes a bootstrap utility which can be used to download and install <application>pkg</application> and its manual pages. This utility is designed to work with versions of FreeBSD starting with 10.<replaceable>X</replaceable>. FreeBSD内置启动(Bootstrap)工具可用来下载并安装<application>pkg</application>及其操作手册。这个工具是设计在FreeBSD版本10.<replaceable>X</replaceable>之后使用。

Loading…

<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make search name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
Maint: ler@lerctr.org
Index: sysutils
B-deps:
R-deps:
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make search name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
Maint: ler@lerctr.org
Index: sysutils
B-deps:
R-deps:
11 months ago
Browse all component changes

Things to check

Unchanged translation

Source and translation are identical

Reset

Glossary

English Chinese (Simplified) (zh_CN)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: listitem/screen
Flags
no-wrap
Source string location
book.translate.xml:9466
String age
a year ago
Source string age
a year ago
Translation file
books/zh_CN/handbook.po, string 1566