So we have learned how to navigate a terminal and manipulate the files and folders within the terminal itself. Now the question is, how to we find files, and programs. Well funnily enough Debian comes packaged with some great commands for this, mainly:

  1. Locate (Finds files and directories)
  2. Which (Finds paths for specific programs)
  3. Find (Finds files given specific parameters)

LOCATE (Finds files and directories)

The locate command uses a database as opposed to searching the hard disk directly, this means that in order for your search result to be true. You must first update the database. Type ‘updatedb’ into the terminal to achieve this.

Now that we have updated the database. Let’s search for the networkd file, type in ‘locate networkd’ and analyze the output.

Fantastic, we found things.

WHICH (Finds paths for specific programs)

Which is a useful command to have in your arsenal, something to note about this command. It will only find the binary file for what you are searching for. What if you need to know is a program is installed in a jiffy? Well which has got your back. Do we have hashcat installed which?

Which has confirmed we do have hashcat installed.

FIND (Finds files given specific parameters)

By far the most useful command for the more granular approach. The general format for this command is as follows:

The starting point for your search, for example root (/) – Which will search through everything

find / 

Followed by the ‘-name’ argument.

find / -name 

Then finally what you want to search for:

find / -name youfoundme

Find is an incredibly useful tool. The main directories you will probably want to search through are:

  1. find / (Everything)
  2. find ~ (Your Home Directory)
  3. find . (In your current Working Directory)

Hope this helps you find something in Kali.






Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.