AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 682852
Accepted
Anuj Tambe
Anuj Tambe
Asked: 2021-12-18 03:28:31 +0800 CST2021-12-18 03:28:31 +0800 CST 2021-12-18 03:28:31 +0800 CST

如何让 pacman 搜索看起来更好?

  • 772

目前我正在使用 Arch。Pacman 是一个很棒的包管理器,但我可以让 pacman 搜索看起来更好吗(pacman -Ss)。例如,如果我搜索一个包,它会给我这样的结果:

extra/foomatic-db-engine 4:20200206-1
    Foomatic - Foomatic's database engine generates PPD files from the data in Foomatic's XML
    database. It also contains scripts to directly generate print queues and handle jobs.
extra/kdav 1:5.89.0-1 (kf5) [installed]
    A DAV protocol implemention with KJobs
extra/print-manager 21.12.0-1 (kde-applications kde-utilities) [installed]
    A tool for managing print jobs and printers
community/blobby2 1.0-4
    A beach ball game with blobs of goo
community/grafana-agent 0.21.2-1
    Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the
    opinionated Grafana observability stack
community/kdav2 0.4.0-1
    A DAV protocol implementation with KJobs
community/libxmlb 0.3.5-1 [installed]
    Library to help create and query binary XML blobs
community/obs-studio 27.1.3-2 [installed]
    Free, open source software for live streaming and recording
community/parallel 20211122-1
    A shell tool for executing jobs in parallel

我搜索obs,我得到了这些结果,看到这些结果是正确的但是不方便找到包和包名。

而 apt 包管理器有更好的搜索: 适当的搜索

请帮助我如何以系统的方式显示 pacman 搜索结果。

arch-linux apt
  • 1 1 个回答
  • 203 Views

1 个回答

  • Voted
  1. Best Answer
    Abdullah Ibn Fulan
    2021-12-18T07:38:04+08:002021-12-18T07:38:04+08:00

    您可以将正则表达式与 pacman 一起使用。

    $ pacman -Ss "http server" | head -n 10 | grep -n ""
    
    1:core/libmicrohttpd 0.9.73-1
    2:    a small C library that is supposed to make it easy to run an HTTP server as part of another application.
    3:extra/apache 2.4.51-2
    4:    A high performance Unix-based HTTP server
    5:extra/nginx 1.20.2-1
    6:    Lightweight HTTP server and IMAP/POP3 proxy server
    7:extra/perl-http-daemon 6.12-1
    8:    Simple http server class
    9:community/gunicorn 20.1.0-1
    10:    WSGI HTTP Server for UNIX
    
    $ pacman -Ss http server | head -n 10 | grep -n ""
    
    1:core/libmicrohttpd 0.9.73-1
    2:    a small C library that is supposed to make it easy to run an HTTP server as part of another application.
    3:extra/apache 2.4.51-2
    4:    A high performance Unix-based HTTP server
    5:extra/libcddb 1.3.2-6.1
    6:    Library that implements the different protocols (CDDBP, HTTP, SMTP) to access data on a CDDB server (e.g. http://freedb.org).
    7:extra/libsoup 2.74.2-1
    8:    HTTP client/server library for GNOME
    9:extra/libsoup3 3.0.3-1
    10:    HTTP client/server library for GNOME
    

    请注意,第一个没有列出libsoup3或者libsoup因为它们没有确切的短语“http server”。

    相似地,

    $ pacman -Ss ^OBS
    
    community/obs-studio 27.1.3-2
        Free, open source software for live streaming and recording
    

    对比

    $ pacman -Ss OBS | head -n 10
    
    extra/foomatic-db-engine 4:20200206-1
        Foomatic - Foomatic's database engine generates PPD files from the data in Foomatic's XML database. It also contains scripts to directly generate print queues and handle jobs.
    extra/kdav 1:5.88.0-1 (kf5)
        A DAV protocol implemention with KJobs
    extra/print-manager 21.08.3-1 (kde-applications kde-utilities)
        A tool for managing print jobs and printers
    community/libxmlb 0.3.5-1
        Library to help create and query binary XML blobs
    community/obs-studio 27.1.3-2
        Free, open source software for live streaming and recording
    
    • 1

相关问题

  • 如何下载软件包而不是使用 apt-get 命令安装它?

  • 如何在 Arch Linux 上设置音频,支持多个程序同时发出音频而不创建 asoundrc?

  • 为什么有时需要手动导入密钥?

  • /etc/apt/sources.list.d 比 /etc/apt/sources.list 有什么好处

  • 在启动时加载设备

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve