•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

How to search in Linux?

  • Home
  • Client
  • Qa Forum
  • How to search in Linux?

Posted By: Luiz | 1 Replies | Last Reply On: May 09, 2019 05:04:31

I am trying to find a specific file and folder.  What command can i use to search folder and file names or files with specific extension? 

Psychz - Manish

Votes: 0Posted On: May 09, 2019 05:04:31
 

In the Linux operating system, the 'find' command allows you to search for files. Even if you know the approximate filenames. The simplest form of the command searches for files in the current directory and recursively through its subdirectories that match the supplied search criteria. You can search for files by name, owner, group, type, permissions, date, and other criteria.

To find a file by name

# find / -name "file_name"

This will be case sensitive, meaning a search for "file" is different than a search for "File". To find a file by name, but ignore the case of the file name

# find / -iname "file_name"

You can specify the type of files you want to find with the "-type" parameter. It works like this:

# find / -type type_descriptor query

So, if you want to search for files or folders/directories you can use the following descriptor that you can use to specify the type of file are here:

f: regular file
d: directory

In your case where you want to search for a file under a specific folder (in this case we will use root directory '/')

find / -type f -name "file_name"

Similarly, you can use the following command to search for a folder

find / -type d -name "folder_name"

 

Hope you find above information helpful and informative. Kindly upvote this response if you like it.

Was this reply helpful?

Related topics

  • Dedicated Server Offers
  • DDoS Protection Pricing
  • Linux Dedicated Server Hosting
  • Linux & Windows Dedicated Solutions
  • Backup Solutions For Linux
  • The ELK Stack: Elasticsearch, Logstash, Kibana.
  • The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site
  • Summary
  • sBlock - iSCSI Windows Guide
  • What are Redirects and Benefits of it
  • Top 6 Tools To Search For Memory Under Linux
  • History of Internet
  • Basic and useful Linux commands
  • In Comparison: Ubuntu VS Linux Mint
  • Top Sources That Will Help You Learn Linux
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801