Linux Essentials For Hackers - #7 - Finding Files With Locate

HackerSploit · Intermediate ·🔐 Cybersecurity ·6y ago
Skills: Linux & CLI90%

Key Takeaways

The video covers the use of the locate utility in Linux to find files, as part of the Linux Essentials For Hackers series.

Full Transcript

hey guys welcome back to the linux essential series for hackers in this video i'm going to be showing you how to use the locate utility to find files now i'll be also making an another video after this to show you how to use the find tool to actually find files as well so they're two utilities that you can use in this video we're going to be taking a look at how to use the locate tool it's a tool that goes ignored by many beginners or newcomers mostly because of its relative simplicity but it's a very efficient tool and does what it's supposed to do so again we can use the what is utility here to tell us more about what this tool is so again we can just say what is locate and as you can see it tells us it finds files by the name which is very simple and again you can use the manual page you can use the manual for this particular tool to learn how to use it so i'm just going to be covering just enough to make you efficient with the tool and make you understand how it works and how you can use it in conjunction with grip all right so uh let's actually get started with a very simple example right so let's say i wanted to locate a file on the system right and i wanted to locate a the password file so i can say locate password and hit enter and you can see it's given me a lot of a lot of information here a lot of files called password on my system right now this is really not efficient because um again i'm looking for a particular file that i'm looking for which is bill which actually exists in the etsy file and we can see the result well that's not actually the result here with this is the result right at the top here all right however this really is not efficient or an efficient way of going about it right so uh this is where we can now specify uh the options that we can use uh that we can use with uh with a tool like locate so let's say we wanted to get only the files that match this particular pattern or these particular uh strings here so the password string so to do this we type a or we use the uh we can use the all parameter or option here and once we hit enter again that gives us the same information so what does that means is it's actually displaying all the files on the system uh that actually match the patterns of password here and because this file really doesn't have any extension we now have to deal with the actual path or the path that we we might want to be uh finding this file in now of course that is counter-intuitive given that um i can say that this belongs in the etsy in the etsy directory and again that now uh it now actually narrows down uh the files into what they may be so again that's the the actual file where we were looking for but you can see how tedious this is so we can actually shorten this now by actually using the grep tool which actually showed you how to use and it's very very simple so again we're simply going to use grip to look for particular information related to the uh to the information that is is given to us by locate so we can now say locate and then we say uh we are looking for password and we close that and now we say we pipe the output and we say grip let's look for password uh within etsy within the etsy directory so again uh we can now say uh etsy here sorry fc and we say password or we can just say the hc directory here and then we can hit close and you can see it gives us the results we're looking for it highlights them in red or depending on the color scheme you're using in your terminal so again we can improve the efficiency of this by typing in etsy password and we hit enter so this is a file without a particular extension which makes it relatively difficult to actually find but you can find it relatively easily if you use grep here um so so let's actually talk about uh about another file that has an extension that we can use to explain this here all right so um let's say we're working with the uh the uh the resolve file or the resolve configuration file which is used for to modify your name servers which is available on all linux systems what we can say is we can say locate resolve and sorry resolve and we hit enter and again tons of files but now we know that this file has an extension so we can say locate it's we can say locate resolve dot conf and read enter and again it still gives us a lot of files but we're looking for the one that belongs in the that exists in the etsy folder again so what we can do now is we can say locate and we want to actually we're looking for we can use the all uh the old parameter here and then we say we're looking for uh all files with an extension or we're looking for a file with the with an extension of uh conf or config here so we'll use the wildcard option to mean that this we're looking for for all files with this particular extension so we say um all and then we say conf and we close those um these quotation marks and now we pipe the output into grep here and now with grep we can then say we are looking for resolve here and we uh sorry that is we're looking for resolve when we enter and now it gives us the information we're looking for and the first option here so again that's with the the actual extension of confirm so again we're limiting the results to uh only the files that have an extension of config or configuration and then we can use grep to find uh the particular string that is most important to us so let me give you another example because this seems very simple um so let's say we're looking for the proxychains right so we can say proxy change and hit enter and there you are you can see immediately now because that is a unique string it gives us the results immediately with the uh with the uh the extension here and that's because we specified it so again we can just say locate uh you know proxy chains and hit enter and there's a ton of files now another thing you might find useful is actually displaying uh how many results are matching the particular pattern you've specified exist so let's say i want to say locate i can say all that means all the the the matching uh the matching patterns here uh so we say all and then we can use the c uh the c argument here which specifies or prints the number of matching results and then we say we specify the string we're looking for or we can just say we're looking for proxy chains and we'd enter and it tells us here that we have 25 uh files uh or results that actually have the matching patterns here now if we limit it to conf and we hit enter now you can see we only have two so that's essentially how to use this tool in regards to you know displaying the amount of matching patterns you have and if you wanted to locate uh so if we get rid of this here and let's hit enter you can now see the results that it tells us here so we have the one in the etsy folder and one indeed the debian package management uh the debian package management folder uh in regards to its actual configuration there so that's how to use the locate tool now again let me just cover one more additional parameter you can use and that is the the i parameter which again is very important and that means that you want to ignore case that's something i should have mentioned earlier all searches with locate are typically going to be case sensitive so again i can say proxy chains and i hit enter and we have no results right so if i wanted to ignore the case sensitivity of what i've just hit of the the pattern i've just entered i can just hit i and i'd enter and again we get the same results and i can now limit this to proxychains.conf and there you are and again i can i can partner these or i can actually combine these commands with each other to give us the information we're looking for so again a very very simple tool to use but again it gives you very consistent results so that's pretty much for this gonna be it for this video guys i'll be seeing you in the next video you

Original Description

Welcome to the Linux Essentials For Hackers series, where we will be covering the 20% you need to know to be efficient with Linux. In this video, we will be covering how to use the locate utility to find files. This series is sponsored by Linode, use the link below to get 20$ in free credits. https://promo.linode.com/hackersploit/ Promo code: HACKERSPLOIT20 ◼️Get Our Courses: Python For Ethical Hacking: https://www.udemy.com/python-for-ethical-hacking-develop-pentesting-tools/?couponCode=PFEHJUN Ethical Hacking Bootcamp: https://www.udemy.com/the-complete-ethical-hacking-bootcamp/?couponCode=TCEHB2019 ◼️Our Platforms: Blog: https://hsploit.com/ HackerSploit Forum: https://hackersploit.org/ HackerSploit Cybersecurity Services: https://hackersploit.io HackerSploit Academy: https://www.hackersploit.academy HackerSploit Discord: https://discord.gg/j3dH7tK HackerSploit Podcast: https://soundcloud.com/hackersploit iTunes: https://itunes.apple.com/us/podcast/the-hackersploit-podcast/id1439732519?mt=2 ◼️Support us by using the following links: Patreon: http://patreon.com/hackersploit I hope you enjoy/enjoyed the video. If you have any questions or suggestions feel free to post them in the comments section or on my social networks. Social Networks - Connect With Us! ------------------------------- Facebook: https://www.facebook.com/HackerSploit/ Twitter: https://twitter.com/HackerSploit Instagram: https://www.instagram.com/hackersploit/ Patreon: http://patreon.com/hackersploit -------------------------------- Thanks for watching! Благодаря за гледането Kiitos katsomisesta Danke fürs Zuschauen! 感谢您观看 Merci d'avoir regardé دیکھنے کے لیے شکریہ देखने के लिए धन्यवाद Grazie per la visione Gracias por ver شكرا للمشاهدة #Linux#Hacking
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from HackerSploit · HackerSploit · 0 of 60

← Previous Next →
1 How To Install Kali Linux 2.0 On Virtual Box
How To Install Kali Linux 2.0 On Virtual Box
HackerSploit
2 100 Subscriber Q&A! - How I Learned Ethical Hacking
100 Subscriber Q&A! - How I Learned Ethical Hacking
HackerSploit
3 BlackArch Linux Review - Better Than Kali Linux?
BlackArch Linux Review - Better Than Kali Linux?
HackerSploit
4 How to Access the Deep Web Safely | Deep Web Starter Guide 1.0
How to Access the Deep Web Safely | Deep Web Starter Guide 1.0
HackerSploit
5 Wireshark Tutorial for Beginners - Installation
Wireshark Tutorial for Beginners - Installation
HackerSploit
6 Wireshark Tutorial for Beginners - Overview of the environment
Wireshark Tutorial for Beginners - Overview of the environment
HackerSploit
7 Wireshark Tutorial for Beginners - Capture options
Wireshark Tutorial for Beginners - Capture options
HackerSploit
8 Wireshark Tutorial for Beginners - Filters
Wireshark Tutorial for Beginners - Filters
HackerSploit
9 Complete Ethical Hacking Course - Become a Hacker Today - #1 Hacking Terminology
Complete Ethical Hacking Course - Become a Hacker Today - #1 Hacking Terminology
HackerSploit
10 Complete Ethical Hacking Course #2 - Installing Kali Linux
Complete Ethical Hacking Course #2 - Installing Kali Linux
HackerSploit
11 Parrot OS 3.5 Review | The Best Kali Linux Alternative
Parrot OS 3.5 Review | The Best Kali Linux Alternative
HackerSploit
12 Nmap Tutorial For Beginners - 1 - What is Nmap?
Nmap Tutorial For Beginners - 1 - What is Nmap?
HackerSploit
13 Katoolin | How To Install Pentesting Tools On Any Linux Distro
Katoolin | How To Install Pentesting Tools On Any Linux Distro
HackerSploit
14 Nmap Tutorial For Beginners - 2 - Advanced Scanning
Nmap Tutorial For Beginners - 2 - Advanced Scanning
HackerSploit
15 Nmap Tutorial For Beginners - 3 - Aggressive Scanning
Nmap Tutorial For Beginners - 3 - Aggressive Scanning
HackerSploit
16 Zenmap Tutorial For Beginners
Zenmap Tutorial For Beginners
HackerSploit
17 How To Setup Proxychains In Kali Linux - #1 - Stay Anonymous
How To Setup Proxychains In Kali Linux - #1 - Stay Anonymous
HackerSploit
18 How To Setup Proxychains In Kali Linux - #2 - Change Your IP
How To Setup Proxychains In Kali Linux - #2 - Change Your IP
HackerSploit
19 How To Change Mac Address In Kali Linux | Macchanger
How To Change Mac Address In Kali Linux | Macchanger
HackerSploit
20 How To Setup And Use anonsurf On Kali Linux | Stay Anonymous
How To Setup And Use anonsurf On Kali Linux | Stay Anonymous
HackerSploit
21 Ubuntu 17.04 "Zesty Zapus" Review - Bye Unity
Ubuntu 17.04 "Zesty Zapus" Review - Bye Unity
HackerSploit
22 VPN And DNS For Beginners | Kali Linux
VPN And DNS For Beginners | Kali Linux
HackerSploit
23 Tails OS Installation And Review - Access The Deep Web/Dark Net
Tails OS Installation And Review - Access The Deep Web/Dark Net
HackerSploit
24 Steganography Tutorial - Hide Messages In Images
Steganography Tutorial - Hide Messages In Images
HackerSploit
25 The Lazy Script - Kali Linux 2017.1 - Automate Penetration Testing!
The Lazy Script - Kali Linux 2017.1 - Automate Penetration Testing!
HackerSploit
26 Best Linux Distributions For Penetration Testing
Best Linux Distributions For Penetration Testing
HackerSploit
27 Netcat Tutorial - The Swiss Army Knife Of Networking - Reverse Shell
Netcat Tutorial - The Swiss Army Knife Of Networking - Reverse Shell
HackerSploit
28 Gaining Access - Web Server Hacking - Metasploitable - #1
Gaining Access - Web Server Hacking - Metasploitable - #1
HackerSploit
29 Web Server Hacking - FTP Backdoor Command Execution With Metasploit - #2
Web Server Hacking - FTP Backdoor Command Execution With Metasploit - #2
HackerSploit
30 How To Install Kali Linux On VMware  - Complete Guide 2018
How To Install Kali Linux On VMware - Complete Guide 2018
HackerSploit
31 Q&A #1 - Best Cyber-security Certifications?
Q&A #1 - Best Cyber-security Certifications?
HackerSploit
32 Terminator - Kali Linux - Multiple Terminals
Terminator - Kali Linux - Multiple Terminals
HackerSploit
33 Shodan Search Engine Tutorial - Access Routers,Servers,Webcams + Install CLI
Shodan Search Engine Tutorial - Access Routers,Servers,Webcams + Install CLI
HackerSploit
34 Q&A #2 - Mr Robot?
Q&A #2 - Mr Robot?
HackerSploit
35 Metasploit Community Web GUI  - Installation And Overview
Metasploit Community Web GUI - Installation And Overview
HackerSploit
36 Linux Expl0rer - Forensics Toolbox - Installation & Configuration
Linux Expl0rer - Forensics Toolbox - Installation & Configuration
HackerSploit
37 QuasarRAT - The Best Windows RAT? - Remote Administration Tool for Windows
QuasarRAT - The Best Windows RAT? - Remote Administration Tool for Windows
HackerSploit
38 Metasploit For Beginners - #1 - The Basics - Modules, Exploits & Payloads
Metasploit For Beginners - #1 - The Basics - Modules, Exploits & Payloads
HackerSploit
39 Metasploit For Beginners - #2 - Understanding Metasploit Modules
Metasploit For Beginners - #2 - Understanding Metasploit Modules
HackerSploit
40 Kali Linux Quick Tips - #1 - Adding a non-root user
Kali Linux Quick Tips - #1 - Adding a non-root user
HackerSploit
41 Metasploit For Beginners - #3 - Information Gathering - Auxiliary Scanners
Metasploit For Beginners - #3 - Information Gathering - Auxiliary Scanners
HackerSploit
42 Spectre Meltdown Vulnerability  - How To Check Your System
Spectre Meltdown Vulnerability - How To Check Your System
HackerSploit
43 Metasploit For Beginners - #4 - Basic Exploitation
Metasploit For Beginners - #4 - Basic Exploitation
HackerSploit
44 ARP Spoofing With arpspoof - MITM
ARP Spoofing With arpspoof - MITM
HackerSploit
45 WordPress Vulnerability Scanning With WPScan
WordPress Vulnerability Scanning With WPScan
HackerSploit
46 Generating A PHP Backdoor with weevely
Generating A PHP Backdoor with weevely
HackerSploit
47 Nikto Web Vulnerability Scanner - Web Penetration Testing - #1
Nikto Web Vulnerability Scanner - Web Penetration Testing - #1
HackerSploit
48 How To Install Kali Linux On Windows 10 - Windows Subsystem For Linux
How To Install Kali Linux On Windows 10 - Windows Subsystem For Linux
HackerSploit
49 Stacer - System Optimizer And Monitoring Tool For Linux
Stacer - System Optimizer And Monitoring Tool For Linux
HackerSploit
50 Kali Linux 2018.1 - Kernel Updates & Patches
Kali Linux 2018.1 - Kernel Updates & Patches
HackerSploit
51 MITM With Ettercap - ARP Poisoning
MITM With Ettercap - ARP Poisoning
HackerSploit
52 Password Cracking With John The Ripper - RAR/ZIP & Linux Passwords
Password Cracking With John The Ripper - RAR/ZIP & Linux Passwords
HackerSploit
53 How To Detect Rootkits On Kali Linux - chkrootkit & rkhunter
How To Detect Rootkits On Kali Linux - chkrootkit & rkhunter
HackerSploit
54 Channel Updates - How To Post Questions & Video Suggestions
Channel Updates - How To Post Questions & Video Suggestions
HackerSploit
55 Web App Penetration Testing - #1 - Setting Up Burp Suite
Web App Penetration Testing - #1 - Setting Up Burp Suite
HackerSploit
56 Web App Penetration Testing - #2 - Spidering & DVWA
Web App Penetration Testing - #2 - Spidering & DVWA
HackerSploit
57 Cl0neMast3r - GitHub Repository Cloning Tool
Cl0neMast3r - GitHub Repository Cloning Tool
HackerSploit
58 Kali Linux On Windows 10 Official - WSL - Installation & Configuration
Kali Linux On Windows 10 Official - WSL - Installation & Configuration
HackerSploit
59 DoS/DDoS Protection - How To Enable ICMP, UDP & TCP Flood Filtering
DoS/DDoS Protection - How To Enable ICMP, UDP & TCP Flood Filtering
HackerSploit
60 Web App Penetration Testing - #3 - Brute Force With Burp Suite
Web App Penetration Testing - #3 - Brute Force With Burp Suite
HackerSploit

This video teaches how to use the locate utility in Linux to efficiently find files, a crucial skill for hackers and cybersecurity professionals. The locate utility is a powerful tool that allows users to quickly search for files on their system. By mastering this utility, users can streamline their workflow and improve their productivity.

Key Takeaways
  1. Open a terminal in Linux
  2. Type the command 'locate' followed by the file name or keyword
  3. Press enter to execute the command and display the search results
  4. Use the locate utility to search for files based on various criteria such as file name, file type, or location
💡 The locate utility is a fast and efficient way to search for files in Linux, and can be used in conjunction with other Linux utilities to improve workflow and productivity.

Related Reads

📰
Active Directory Enumeration & Password Spraying: A Hands-On Guide
Learn hands-on techniques for Active Directory enumeration and password spraying to enhance your internal penetration testing skills in Microsoft Windows environments
Medium · Cybersecurity
📰
The Quantum Internet Explained: How the Next Generation of Communication Could Be Unhackable
Learn how the quantum internet can revolutionize cybersecurity with unhackable communication, and why it matters for the future of data transfer
Medium · Cybersecurity
📰
Zero Trust Starts Before Login: Lessons From Cloud Security
Learn how Zero Trust security starts before login and its importance in cloud security
Medium · DevOps
📰
Zero Trust Starts Before Login: Lessons From Cloud Security
Learn how Zero Trust security starts before login and why continuous verification is crucial for cloud security
Medium · Cybersecurity
Up next
What is DevSecOps Explained with Examples
VLR Software Training
Watch →