linux 명령어 apropos
$ apropos
관련 명령어 검색하는 명령어.
$ apropos ssh
authorized_keys (5) - OpenSSH daemon
git-shell (1) - Restricted login shell for Git-only SSH access
rcp (1) - OpenSSH secure file copy
rlogin (1) - OpenSSH remote login client
rsh (1) - OpenSSH remote login client
scp (1) - OpenSSH secure file copy
sftp (1) - OpenSSH secure file transfer
sftp-server (8) - OpenSSH SFTP server subsystem
slogin (1) - OpenSSH remote login client
ssh (1) - OpenSSH remote login client
ssh-add (1) - adds private key identities to the OpenSSH authentication agent
ssh-agent (1) - OpenSSH authentication agent
ssh-argv0 (1) - replaces the old ssh command-name as hostname handling
ssh-copy-id (1) - use locally available keys to authorise logins on a remote machine
ssh-import-id (1) - retrieve one or more public keys from a public keyserver and append them to the current user's...
ssh-import-id-gh (1) - retrieve one or more public keys from a public keyserver and append them to the current user's...
ssh-import-id-lp (1) - retrieve one or more public keys from a public keyserver and append them to the current user's...
ssh-keygen (1) - OpenSSH authentication key utility
ssh-keyscan (1) - gather SSH public keys from servers
ssh-keysign (8) - OpenSSH helper for host-based authentication
ssh-pkcs11-helper (8) - OpenSSH helper for PKCS#11 support
ssh-sk-helper (8) - OpenSSH helper for FIDO authenticator support
ssh_config (5) - OpenSSH client configuration file
sshd (8) - OpenSSH daemon
sshd_config (5) - OpenSSH daemon configuration file
apropos ssh 관련 목록을 보여줍니다.
Linux 명령어 apropos
주제와 관련된 명령어를 검색하기 위한 명령어
1. 자세한 설명
apropos
명령어는 Linux에서 특정 키워드와 관련된 명령어를 검색하는 데 사용됩니다. 이 명령어는 시스템의 매뉴얼 페이지를 검색하여 주제와 관련된 정보를 제공합니다. 주제가 명확하지 않은 경우 적절한 명령어를 빠르게 찾는 데 유용합니다.
2. 사용법
- 키워드 검색
apropos [키워드]
입력한 키워드와 관련된 명령어를 검색합니다. - 다중 키워드 검색
apropos '[키워드1] [키워드2]'
여러 키워드를 함께 검색합니다. - 검색 결과 필터링
특정 결과를 얻기 위해grep
명령어와 결합하여 사용합니다.
3. 자세하게 설명
apropos
명령어는 다음과 같은 주요 특징을 제공합니다:
- 매뉴얼 페이지 검색: 시스템의 매뉴얼 페이지를 기반으로 관련 명령어를 제공합니다.
- 키워드 기반 검색: 사용자가 입력한 키워드와 연관된 명령어를 탐색합니다.
- 다중 키워드 지원: 하나 이상의 키워드를 조합하여 보다 정밀한 검색을 수행할 수 있습니다.
- 결과 필터링: 다른 명령어와 결합하여 검색 결과를 정리하고 필터링할 수 있습니다.
4. 자세한 명령어 사용법
다음은 apropos
명령어의 다양한 사용 예제입니다:
# 특정 키워드와 관련된 명령어 검색 $ apropos network # 다중 키워드 검색 $ apropos 'file permission' # 특정 키워드 결과를 필터링하여 검색 $ apropos user | grep add # 검색 결과를 파일로 저장 $ apropos process > process_commands.txt # 검색 결과를 정렬하여 출력 $ apropos network | sort # 키워드와 관련된 명령어 실행 여부 확인 $ apropos disk | xargs -n 1 man # 잘못된 입력 시도 시 오류 확인 $ apropos 'nonexistent_keyword' # JSON 형식으로 검색 결과 저장 $ apropos network | jq -R '{result: .}' # 스크립트를 통해 키워드 검색 자동화 #!/bin/bash keywords="network file user" for keyword in $keywords; do apropos $keyword done # 로그 파일에 검색 결과 저장 $ apropos memory >> search_log.txt # 특정 명령어와 결합하여 결과 출력 $ apropos file | awk '{print $1, $2}' # 대량 키워드 검색 후 결과 결합 #!/bin/bash keywords=("user" "disk" "file") for key in "${keywords[@]}"; do apropos $key >> all_keywords.txt done # 매뉴얼 페이지를 활용한 결과 심화 검색 $ apropos shell | xargs man -k # 특정 주제 검색 후 상태 출력 $ apropos backup | echo "관련 명령어 검색 완료"
위의 예제는 apropos
명령어를 사용하여 관련 명령어를 검색하고 필터링하는 다양한 방법을 보여줍니다.
No responses yet