ほぼ全ての機能を新サイトへ移行しました

問題ID 33784

  • フォーラムは新サイトへ移行しました。
  • このフォーラムではゲスト投稿が禁止されています
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2020-7-27 21:16
jonathan4649  半人前   投稿数: 9
設問:
apt-cacheコマンドを使用して、キーワード「ssh」を含むパッケージを表示させたい。適切なコマンドは次のうちどれか。
正解:
apt-cache -show ssh
apt-cache show ssh
apt-cache depends ssh
apt-cache showpkg ssh
○apt-cache search ssh

正解がapt-cache show sshにならない理由をどなたか教えて頂けると嬉しいです。
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2020-7-27 23:55
arashi1977  長老 居住地: 広島  投稿数: 1715
引用:
正解がapt-cache show sshにならない理由をどなたか教えて頂けると嬉しいです。
問題文の
引用:
キーワード「ssh」を含むパッケージを表示させたい。
から考えると
・ssh という文字列を含むパッケージ
・ssh というパッケージ
のどちらが正答になるか、という話ですよね。(もちろんこの問題では前者が求められている)

show だとこうです。「ssh」パッケージの情報は表示されますが、それ以外の「ssh」というキーワードを含むパッケージの情報は表示されていません。
$ apt-cache show ssh
Package: ssh ← 「ssh」パッケージである
Source: openssh
Version: 1:7.9p1-10+deb10u2
Installed-Size: 215
Maintainer: Debian OpenSSH Maintainers <debian-ssh@lists.debian.org>
Architecture: all
Depends: openssh-client (>= 1:7.9p1-10+deb10u2), openssh-server (>= 1:7.9p1-10+deb10u2)
Pre-Depends: dpkg (>= 1.17.5)
Size: 202208
SHA256: f75444fc82aefa4c563e71d1778934beb8227c598f17d6c47374d49f0032fd2f
SHA1: 6e4a574cc2adedffd444e047773b23cd2857de7f
MD5sum: 367524b8bcebc379f5d1cfc6c066a560
Description: secure shell client and server (metapackage)
 This metapackage is a convenient way to install both the OpenSSH client
 and the OpenSSH server. It provides nothing in and of itself, so you
 may remove it if nothing depends on it.
Description-md5: b00e309365895c14a10af55945efb136
Homepage: http://www.openssh.com/
Tag: interface::shell, network::client, network::server, protocol::ip,
 protocol::ipv6, protocol::ssh, role::dummy, role::metapackage,
 role::program, scope::utility, security::cryptography, use::login
Section: net
Priority: optional
Filename: pool/main/o/openssh/ssh_7.9p1-10+deb10u2_all.deb

searchだと(大量に出るので省略しますが)こうです。
$ apt-cache search ssh | head -n 20
4pane - four-pane detailed-list file manager
agent-transfer - copy a secret key from GnuPG's gpg-agent to OpenSSH's ssh-agent
ansible - Configuration management, deployment, and task execution system
ansible-doc - Ansible documentation and examples
aolserver4-nssha1 - AOLserver4 module: performs SHA1 hashes Provides a Tcl
apt-dater - terminal-based remote package update manager
apt-dater-host - host helper application for apt-dater
arno-iptables-firewall - single- and multi-homed firewall script with DSL/ADSL support
auth2db-filters - Auth2db defaults filters pack
autossh - Automatically restart SSH sessions and tunnels
avahi-ui-utils - Avahi GTK+ utilities
avfs - virtual filesystem to access archives, disk images, remote locations
backintime-common - simple backup/snapshot system (common files)
backup-manager - command-line backup tool
backuppc - high-performance, enterprise-grade system for backing up PCs
bar - Show information about a data transfer
belier - SSH connection generation tool
boa-constructor - RAD tool for Python and wxWindows application
borgbackup - deduplicating and compressing backup program
borgbackup-doc - deduplicating and compressing backup program (documentation)
「どこに ssh が入ってるんだ!」って話ですが、例えば最初の 4pane でいくと
$ apt-cache show 4pane
Package: 4pane
Version: 5.0-2
Architecture: armhf
Maintainer: David Hart <david@4Pane.co.uk>
Installed-Size: 4680
Depends: libatk1.0-0 (>= 1.12.4), libbz2-1.0, libc6 (>= 2.15), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libgcc1 (>= 1:3.5), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.16.0), libgtk-3-0 (>= 3.0.0), liblzma5 (>= 5.1.1alpha+20110809), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libstdc++6 (>= 5.2), libwxbase3.0-0v5 (>= 3.0.4+dfsg), libwxgtk3.0-gtk3-0v5 (>= 3.0.4+dfsg)
Homepage: http://www.4Pane.co.uk
Priority: optional
Section: x11
Filename: pool/main/4/4pane/4pane_5.0-2_armhf.deb
Size: 1048948
SHA256: 2ec9eaa0ca80b9f496dfe688f2432bdc012fa71e37e2bae136b9a7c23378436b
SHA1: 22cab9ac4291939785c95aba6d78739bdf758e04
MD5sum: 0400034a768ce727aa07c2062f2187b5
Description: four-pane detailed-list file manager
 4pane is a dual twin-pane file manager: directories and files are displayed
 in separate panes. By default two pairs of these twin-panes are displayed at
 a time, allowing easy dragging or pasting.
 .
 As well as standard file manager functions, features include support for
 nfs sshfs and samba, archive management including virtual browsing, ←ここの行
 multiple renaming of files, user-defined tools, a terminal emulator, and
 gui access to grep find and locate. Almost all actions, even deletions,
 can be undone and redone.
 .
 4pane aims to be highly configurable, fast and fully-featured without bloat.
Description-md5: 0cbfd20b52fcad0147c132cddb630702

$ apt-cache show 4pane | grep ssh
 nfs sshfs and samba, archive management including virtual browsing,
と、パッケージ名、説明などにキーワード「ssh」が含まれるものが抽出されるのが「search」なんですね。
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2020-7-28 20:50
jonathan4649  半人前   投稿数: 9
丁寧にありがとうございました!

  >フォーラム検索へ


Copyright (c) 2020 Ping-t All rights reserved.
ログイン
ユーザ名 or E-Mailアドレス:

パスワード:







プレミアムコンテンツ

受験チケット(割引)

Contact

LPI-Japan Logo

LPI Logo