Linux `find` Command

Linux `find` Command

                  ███████████████████████████████
                  ███   Linux `find` Command  ███
                  ███████████████████████████████

╭─user@hostname ~
╰─$ find [path] [options] [expression]

Common Usages:
───────────────
1. Find Files by Name:
?? find /path/to/search -name "filename"

2. Find Files by Type:
?? find /path/to/search -type f

3. Find Directories:
?? find /path/to/search -type d

4. Find Files Modified Within X Days:
?? find /path/to/search -type f -mtime -X

5. Find Files Larger Than X Size:
?? find /path/to/search -type f -size +Xc

6. Find Files Owned by User:
?? find /path/to/search -type f -user username

7. Find and Execute Commands:
?? find /path/to/search -name "*.txt" -exec command {} \;

8. Find Files and Exclude Paths:
?? find /path/to/search -name "pattern" -not -path "/exclude/path"

9. Find Files and Apply Actions:
?? find /path/to/search -name "*.log" -exec rm {} \;

10. Find Files by Permissions:
??? find /path/to/search -type f -perm 644

11. Find Files by Extension:
??? find /path/to/search -type f -name "*.jpg"

12. Find and Display Results Verbosely:
??? find /path/to/search -type f -print

Options:
───────
-name "pattern"? : Find by name.
-type [f|d]????? : Find files (f) or directories (d).
-mtime +/-X????? : Find files modified +/- X days ago.
-size [+|-]Xc??? : Find files larger (+) or smaller (-) than X bytes.
-user username?? : Find files owned by a specific user.
-exec command {} : Execute a command on found files.
-not -path "p"?? : Exclude specific paths.
-perm mode?????? : Find files with specific permissions.
-print?????????? : Print found files.

For more details, check the man page: man find

╭─user@hostname ~
╰─$ Follow me https://www.dhirubhai.net/in/kevinvanegasz/
        


#linux #programming #java #coding #code #html #programmer #developer #android #css #windows #tech #computerscience #technology #python #javascript #dev #reactjs #developers #engineer #web #webdeveloper #itmanager #laravel #software #rubyonrails #coder #xml #gameofthrones #webdesign

要查看或添加评论,请登录

KEVIN VANEGAS的更多文章

  • LittlePivoting-Dockerlabs Walkthrough / WriteUp

    LittlePivoting-Dockerlabs Walkthrough / WriteUp

    Hello everyone, we continue exploring the Dockerlabs DockerLabs platform that I introduced in my previous video! This…

    5 条评论
  • AS-REP roasting with Crackmapexec/NetExec

    AS-REP roasting with Crackmapexec/NetExec

    This new Crackmapexec/NetExec series is a part of the Active Directory Lab series on my channel . With tools like…

  • Vulnerable Active Directory Lab

    Vulnerable Active Directory Lab

    I'm currently learning pentesting techniques for Active Directory, and I've been sharing my progress on YouTube. Today,…

  • Enumeration With BloodHound

    Enumeration With BloodHound

    As a cybersecurity student, I'm constantly seeking ways to expand my knowledge and skill set. Recently, I delved into…

  • Learning About DCSync Attacks in Active Directory

    Learning About DCSync Attacks in Active Directory

    I continued diving into exploitation techniques within Active Directory. Here are the key highlights: 1?? DCSync…

  • Set Up and Test ASREProast and Kerberoasting Attacks

    Set Up and Test ASREProast and Kerberoasting Attacks

    We create a small Active Directory lab using VirtualBox and a Windows Server Standard evaluation. We'll configure it to…

  • My notes on solving 'Return' from Hack The Box.

    My notes on solving 'Return' from Hack The Box.

    > The machine Key Concepts: Windows Remote Management (WinRM), SMB (Server Message Block), Enumeration, Printer Admin…

  • Creating a basic bash script

    Creating a basic bash script

    I'll show you how to create your first Bash script to perform a small fuzzing operation with the goal of gaining access…

  • Cross-site WebSocket hijacking (CSWSH) | RC4 encryption

    Cross-site WebSocket hijacking (CSWSH) | RC4 encryption

    ?? Cybersecurity Journey Update: Inkplot Challenge Completed on HackMyVM! ?? Watch the video here: Link to Video I took…

  • Dominating 3 Buffer Overflows on a Single Machine

    Dominating 3 Buffer Overflows on a Single Machine

    During my journey, I encountered a host of vulnerabilities, including local file inclusion, log poisoning, and the…

社区洞察

其他会员也浏览了