Guest User

Untitled

a guest
Sep 24th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # How about learning about whereis and which using whatis?
  2.  
  3. ```bash
  4. $ whatis which
  5. which (1) - shows the full path of (shell) commands
  6.  
  7. $ whatis whereis
  8. whereis (1) - locate the binary, source, and manual page files for a command
  9. Basically, whereis searches for "possibly useful" files, while which only searches for executables.
  10. ```
  11.  
  12. I rarely use whereis. On the other hand, which is very useful, specially in scripts. which is the answer for the following question: Where does this command come from?
  13.  
  14. ```bash
  15. $ which ls
  16. /bin/ls
  17.  
  18. $ whereis ls
  19. ls: /bin/ls /usr/share/man/man1p/ls.1p.bz2 /usr/share/man/man1/ls.1.bz2
Add Comment
Please, Sign In to add comment