Summary


In this lesson we covered the fundamentals of finding files and directories within your Unix system as well as the different commands you can use. You also learned how to search the contents of a file itself with the grep command. In addition, you were introduced to finding files in the KDE GUI. Spend some time mastering the find and grep commands, and you will see that they are useful when you want to find data on your Unix system. We have skimmed only the surface of what grep can do once mastered. Visit the man page for grep and take a look at its power. Get comfortable using the man command; it can help you as well! Now that you can see that Unix provides a set of powerful utilities to help you find what you are looking for, you shouldn't feel like you are completely lost anymore, nor should your data.

  • find The find command can search the entire Unix file system or the area under any directory for a particular file based on a variety of criteria. You have seen how to use it to find files based on name, creation date, and size.

  • whereis If you're looking for a program file, its source, or its man pages, the whereis command might work for you. Searching a preset list of common file locations, whereis quickly returns paths to anything it finds.

  • which The which function is dependent on your PATH environment variable. It searches the paths that you have specified for a particular filename.

  • grep (grep/egrep/fgrep) The grep command set is an extremely powerful method of searching the actual content of files for a particular word or pattern. The power of the grep command when coupled with regular expressions (see Lesson 13, "Regular Expressions") is incredible.

  • Find Utility KDE provides an easy-to-use interface that encompasses many of the features of find and grep.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net