Our social:

How to find path of any folder or file using locate and which in kali linux ?

Hello friends..!! welcome to HackHackers..!!

In this article we are going too learn basic commands of kali linux that are final , locate and which commands . All the three commands final , locate and which are very similar to eacch other but work and return data  in different ways.

ALSO READ : HOW TO HACK FACEBOOK ACCOUNT ? 


Now we are going to use locate commands it  is very simple :

Now In order to use locate you have to first use updatedb command to build a local database of all files in the system . After you run the updatedb command it will create a local database of all files on the file system.once , the database is created  , local can be used . Let's  run over command step by step :

Step 1 : First try to run locate command  it will show error .

Step 2 : Now , run the updatedb commmand .

root@kali:~# updatedb

Step 3 : Now run locate filename*
Filename -  Name of file that you want to locate .

Step 4 : now here i will run

root@kali:~# locate HackHackers
/root/Desktop/HackHackers

It will show me the path of desktop because the folder which i have recently created named as HackHackers is on desktop .

So , by using locate we can find path of any particular file , Locate will used to find Local files.

Which command searches through that are defined in $PATH environment variable for  given particular file . if it find any matches it will return the full path  of it as shown below .

root@kali:~# which HackHackers
user/bin/HackHackers

ALSO READ : HOW TO HACK WHATSAPP ACCOUNT ?

That's it friends ..!! You can watch our video tutorial Here :