SATOHOST
No Result
View All Result
Thứ Sáu, Tháng Một 22, 2021
  • Login
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1
Subscribe
SATOHOST
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1
No Result
View All Result
SATOHOST
No Result
View All Result
Home Blog

Search All the Linux Man Pages For a Particular Command or Text

admin by admin
Tháng Sáu 3, 2019
in Blog
5 min read
0
152
SHARES
1.9k
VIEWS
Share on FacebookShare on Twitter

Under KDE or Gnome desktop I get nice facility to search all man pages for particular command or phrase. I am login to remote server over the ssh session. How do I search all the man pages for a particular command at Linux shell prompt?

You need to use the following commands to search man pages:

apropos Command

The apropos command searches a set of database files containing short descriptions of system commands for keywords and shows the result on the screen. The syntax is as follows:

apropos keyword
apropos "string or phrase"
apropos -s 1 delete

apropos keyword
apropos "string or phrase"
apropos -s 1 delete

apropos Command Examples

To Search command / functions related to compare operation, enter:
$ apropos compare
Sample outputs:

[ (1)                - check file types and compare values
bcmp (3)             - compare byte sequences
bzcmp (1)            - compare bzip2 compressed files
bzdiff (1)           - compare bzip2 compressed files
cmp (1)              - compare two files byte by byte
comm (1)             - compare two sorted files line by line
compare (1)          - mathematically and visually annotate the difference between an image and its reconstruction.
diff (1)             - compare files line by line
diff3 (1)            - compare three files line by line
git-diff-files (1)   - Compares files in the working tree and the index
git-diff-index (1)   - Compares content and mode of blobs between the index and repository
git-diff-tree (1)    - Compares the content and mode of blobs found via two tree objects
infocmp (1)          - compare or print out terminfo descriptions
mcomp (1)            - Compares two files using mtools
memcmp (3)           - compare memory areas
msgcmp (1)           - compare message catalog and template
ndiff (1)            - Utility to compare the results of Nmap scans
ntfscmp (8)          - compare two NTFS filesystems and tell the differences
pthread_equal (3)    - compare thread IDs
strcasecmp (3)       - compare two strings ignoring case
strcmp (3)           - compare two strings
strcoll (3)          - compare two strings using the current locale
strncasecmp (3)      - compare two strings ignoring case
strncmp (3)          - compare two strings
strverscmp (3)       - compare two version strings
test (1)             - check file types and compare values
wcscasecmp (3)       - compare two wide-character strings, ignoring case
wcscmp (3)           - compare two wide-character strings
wcsncasecmp (3)      - compare two fixed-size wide-character strings, ignoring case
wcsncmp (3)          - compare two fixed-size wide-character strings
wmemcmp (3)          - compare two arrays of wide-characters
xzcmp (1)            - compare compressed files
xzdiff (1)           - compare compressed files
zcmp (1)             - compare compressed files
zdiff (1)            - compare compressed files

Task: Search For a String

Search command to remove a file, enter:
$ apropos "remove file"
Sample outputs:

rm                   (1)  - remove files or directorie

Task: Search Specific Section of The Man Page

To search only the given manual section use the -s option:
apropos -s 1 compare
Sample outputs:

[ (1)                - check file types and compare values
bzcmp (1)            - compare bzip2 compressed files
bzdiff (1)           - compare bzip2 compressed files
cmp (1)              - compare two files byte by byte
comm (1)             - compare two sorted files line by line
compare (1)          - mathematically and visually annotate the difference between an image and its reconstruction.
diff (1)             - compare files line by line
diff3 (1)            - compare three files line by line
git-diff-files (1)   - Compares files in the working tree and the index
git-diff-index (1)   - Compares content and mode of blobs between the index and repository
git-diff-tree (1)    - Compares the content and mode of blobs found via two tree objects
infocmp (1)          - compare or print out terminfo descriptions
mcomp (1)            - Compares two files using mtools
msgcmp (1)           - compare message catalog and template
ndiff (1)            - Utility to compare the results of Nmap scans
test (1)             - check file types and compare values
xzcmp (1)            - compare compressed files
xzdiff (1)           - compare compressed files
zcmp (1)             - compare compressed files
zdiff (1)            - compare compressed files

Task: Regex Based Search

You can force apropos to interpret each keyword as a regular expression using the -r option:
$ apropos -r scanf
Sample outputs:

fscanf (3)           - input format conversion
scanf (3)            - input format conversion
sscanf (3)           - input format conversion
Video::DVDRip::CPAN::Scanf (3pm) - emulate sscanf() of the C library
vfscanf (3)          - input format conversion
vscanf (3)           - input format conversion
vsscanf (3)          - input format conversion

The ‘man -K’ Command

The -K option is passed to the man command to search for the specified string in all man pages. The syntax is as follows:

man -K keyword
man -K "string or phrase"

man -K keyword
man -K "string or phrase"

Search all man pages for fopen word, type:
$ man -K "fopen"
Output:

/usr/share/man/en/man3/fclose.3.gz? [ynq]   

Type y to open/display man page, n to continue search, q to Quit search. This is a brute-force search, and is likely to take some time. So it helps to specify a man page section (1-7) using the following syntax:
$ man -s 3 -K "open"
OR
$ man -s 8 -K "user"

Please note that above commands also works with other UNIX and *BSD like oses

Share on Facebook Twitter

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Tags: blog
admin

admin

Related Posts

Blog

LINUX BACKUP & RESTORE FULL OS

Tháng Mười Hai 16, 2020
Blog

VPS Ram 4GB Chỉ 199k/tháng Miễn Phí Gsuite,

Tháng Tám 29, 2020
Blog

Tài Khoản Google Drive Unlimited 2020 50k – Google Drive Không Giới Hạn – Google drive unlimited 2020

Tháng Bảy 11, 2020
Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)
Blog

Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Tháng Bảy 11, 2020
Blog

Hướng dẫn kích hoạt bản quyền Windows Server 2012 R2 không cần crack

Tháng Sáu 10, 2020
Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z
Blog

Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Tháng Sáu 4, 2020
Hướng dẫn Tự Tạo Ứng Dụng Họp Online Phòng Học Online Miễn Phí với Jitsi
Blog

Hướng dẫn Tự Tạo Ứng Dụng Họp Online Phòng Học Online Miễn Phí với Jitsi

Tháng Tư 13, 2020
Hướng dẫn sử dụng Remote Desktop để truy cập VPS
Blog

Hướng dẫn sử dụng Remote Desktop để truy cập VPS

Tháng Tư 12, 2020
Download Kali Linux 2020.1
Blog

Download Kali Linux 2020.1

Tháng Tư 12, 2020
vps giá rẻ
  • Trending
  • Comments
  • Latest
Hướng dẫn cài DirectAdmin Nulled mới nhất 2020

Hướng dẫn cài DirectAdmin Nulled mới nhất 2020

Tháng Sáu 10, 2020
Wowza Streaming Engine 4.7.7 Crack Linux/Windows

Wowza Streaming Engine 4.7.7 Crack Linux/Windows

Tháng Mười Một 15, 2020
Nén và giải nén trong linux centos 6 centos 7 nén zip, tar.gz và tar.bz2.

Khuyến mãi vps 50k/tháng SSD 50Gb

Tháng Sáu 15, 2019
Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Tháng Bảy 11, 2020

Cpanel Nulled Cpanel/whm Nulled on Centos VPS/Dedicated Servers

Tháng Mười 8, 2020
Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Tháng Sáu 4, 2020

LINUX BACKUP & RESTORE FULL OS

0

Milestones & Timeline

0

The Economics of Websites

0

The Landing Page Guide

0

The Next Big Thing

0

UX Design Is Easy

0

LINUX BACKUP & RESTORE FULL OS

Tháng Mười Hai 16, 2020

VPS Ram 4GB Chỉ 199k/tháng Miễn Phí Gsuite,

Tháng Tám 29, 2020

Tài Khoản Google Drive Unlimited 2020 50k – Google Drive Không Giới Hạn – Google drive unlimited 2020

Tháng Bảy 11, 2020
Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Tháng Bảy 11, 2020

Hướng dẫn kích hoạt bản quyền Windows Server 2012 R2 không cần crack

Tháng Sáu 10, 2020
Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Tháng Sáu 4, 2020
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1
Call us: 0975757375

© 2020

No Result
View All Result
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1

© 2020

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In