Close Menu
    Facebook X (Twitter) Instagram
    Oixiesoft
    • Home
    • Services
      • WordPress Malware Removal
      • Fix WordPress Errors
      • WordPress Website Development
    • Articles
    • Contact
    Oixiesoft
    Home»Tutorial»Find command in Linux with examples
    Tutorial

    Find command in Linux with examples

    Editorial StaffBy Editorial StaffUpdated:September 27, 2025No Comments2 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email

    The Find command is one of the most commonly used commands in Linux. It saves a lot of time to find specific files and folders.

    We can search files and folders with different parameters like permission, name, extension, etc. In this article, we will learn different uses of the find command.

    Find command in Linux with examples

    Find command execute in the following manner:

    $ find [target directory]
    [expression determines what to find] [-options] [what to find]

    Find command in Linux with examples

    1. Find Files in Current Directory by using file name

    If you want to search all files contain namestring in the file name. Execute following command:

    # find . -name filename.txt
    
    ./filename.txt
    
    

    2. Find Directories Using Name

    It will search all directories with name “oixiesoft”

    # find / -type d -name oixiesoft
    ./oixiesoft 

    3. Find all html Files in Directory

    It will search all files with .html extention

    # . -type f -name "*.html"
    
    ./oixiesoft.html
    ./indext.html
    ./sample.html

    4. Find Files With Permissions

    It will search all files with 644 permission. If want to search files with another permission, just replace 644 with required permission.

    # find . -type f -perm 0644 -print

    5. Find Files Without 644 Permissions

    We can search all files without 644 permission with this command:

    # find / -type f ! -perm 644
    

    6. Find empty files and directories

    We can find all empty files and directories with this command:

    $ find ./ -empty 

    7.  Find and remove single File

    You can find and delete the file with name sample.txt with this command:

    # find . -type f -name "sample.txt" -exec rm -f {} \;

    8. Find and remove Files contain specific extension

    If you want to search and remove all files with a specific extension, execute the following command. Just replace .mp3 with your desired extension.

    # find . -type f -name "*.mp3" -exec rm -f {} \; 

    9. Find all Hidden Files

    If you want to search all hidden files, execute the following command:

    # find / -type f -name ".*" [php]
    <h2>10. Find Last 30 Days Modified Files</h2>
    This command find all files modified in last 30 days,
    
    [php] # find / -mtime 30

     

    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
    Editorial Staff

    Related Posts

    CodeIgniter vs Laravel: A Detailed Side-by-Side Comparison

    Python Arrays

    Python Lambda

    Services
    • Web Development
    • Mobile Application Development
    • WordPress Malware Removal Service
    • Website Design
    • WordPress Development
    • Magento Development
    • Shopify Development
    • SEO Services
    Blog
    • How to Fix the Error Establishing a Database Connection
    • Ping List WordPress
    • How To Fix Japanese Keyword Hack
    • How to remove Malware from WordPress
    Hire Developers
    • Hire WordPress Developer
    • Hire Shopify Developer
    Contact Info
    • Oixiesoft Technologies
      A-40, Block A, I thum Tower, Sector 62, Noida
    • [email protected]
    • Privacy Policy
    • About Us
    • Contact Us
    © 2025 OixieSoft Technologies

    Type above and press Enter to search. Press Esc to cancel.