• Finding Binaries with whereis
  • q (for quit), and you’ll return to the command prompt. Finding Stuff




    Download 7,3 Mb.
    Pdf ko'rish
    bet33/125
    Sana14.05.2024
    Hajmi7,3 Mb.
    #232858
    1   ...   29   30   31   32   33   34   35   36   ...   125
    Bog'liq
    linuxbasicsforhackers

    q
    (for quit), and you’ll return to the command prompt.
    Finding Stuff
    Until you become familiar with Linux, it can be frustrating to find your way 
    around, but knowledge of a few basic commands and techniques will go a 
    long way toward making the command line much friendlier. The following 
    commands help you locate things from the terminal.


    10
    Chapter 1
    Searching with locate
    Probably the easiest command to use is 
    locate
    . Followed by a keyword denot-
    ing what it is you want to find, this command will go through your entire 
    filesystem and locate every occurrence of that word.
    To look for aircrack-ng, for example, enter the following:
    kali >
    locate aircrack-ng
    /usr/bin/aircrack-ng
    /usr/share/applications/kali-aircrack-ng.desktop
    /usr/share/desktop-directories/05-1-01-aircrack-ng.directory
    --
    snip
    --
    /var/lib/dpkg/info/aircrack-ng.md5sums
    The 
    locate
    command is not perfect, however. Sometimes the results of 
    locate
    can be overwhelming, giving you too much information. Also, 
    locate
    uses a database that is usually only updated once a day, so if you just created 
    a file a few minutes or a few hours ago, it might not appear in this list until 
    the next day. It’s worth knowing the disadvantages of these basic commands 
    so you can better decide when best to use each one.
    Finding Binaries with whereis
    If you’re looking for a binary file, you can use the 
    whereis
    command to 
    locate it. This command returns not only the location of the binary but 
    also its source and man page if they are available. Here’s an example:
    kali >
    whereis aircrack-ng
    aircarck-ng: /usr/bin/aircarck-ng /usr/share/man/man1/aircarck-ng.1.gz
    In this case, 
    whereis
    returned just the aircrack-ng binaries and man page, 
    rather than every occurrence of the word aircrack-ng. Much more efficient 
    and illuminating, don’t you think?

    Download 7,3 Mb.
    1   ...   29   30   31   32   33   34   35   36   ...   125




    Download 7,3 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    q (for quit), and you’ll return to the command prompt. Finding Stuff

    Download 7,3 Mb.
    Pdf ko'rish