Tuesday, November 5, 2013

whereis Linux Command Option


whereis Linux Command Option

Command: whereis

Command Usage: locate the binary, source, and manual page files for a command

Syntax For Whereis Command: $  whereis [options] file

Examples For Whereis Command:

1. To find out where a specific linux command exists

    $ whereis ls

    ls: /bin/ls /usr/share/man/man1/ls.1.gz

2. To find out the executable for a specific command is available

    $ whereis -b ls

    ls: /bin/ls

3. To search only for manual sections

    $ whereis -m ls

    ls: /usr/share/man/man1/ls.1.gz

4. To locate source of Linux command

    $ whereis -s ps

5. To locate unusual entries using -u option

    $ whereis -m -u lsgrep

    lsgrep:    it checks the command lsgrep source, binary and man pages
    if its an unusual entry it throws the above output

    $ whereis -m -u grep
  

    it checks for grep source, binary and man page if find
    whereis returned nothing and exits normally.

whereis Linux Command Option

No comments:

Post a Comment

Linux Tips and tricks,Online Linux Helpers