Finding Commands

por | 16 febrero, 2008

Command and Sample Output  ::  Description

Show the first mount command in PATH:
$ type mount
mount is /bin/mount

Show binary source, and man pages for mount:
$ whereis mount
mount: /bin/mount /sbin/mount.cifs /sbin/mount.nfs /sbin/mount.nfs4
/usr/share/man/man2/mount.2.gz /usr/share/man/man8/mount.8.gz

Find bash.ps anywhere in the file system
$ locate bash.ps
/usr/share/doc/bash-3.1/bash.ps
/usr/share/doc/bash-3.1/rbash.ps

Find the umount command anywhere in your PATH or aliases
$ which umount
/bin/umount

Find umount in any installed package
$ rpm -qal |grep umount
/usr/share/man/es/man2/umount.2.gz
/sbin/umount.nfs
/sbin/umount.nfs4

Finds bzfs in the bzflag package
$yum install bzflag

find man pages for commands related to a certain word
$apropos crontab

show NAME lines alone for commands
$whatis cat