•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Backup
    • Content Delivery Network
    • Colocation Hosting
    • Dedicated Hosting
    • DDoS Mitigation
    • IP Transit
    • Private Cloud
    • Wavelength
  •  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
    • Dedicated Servers
    • Colocation
    • Private Cloud
    • DDos Protection
    • IP Transit
    • CDN
    • Backup
  • 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
  • The ELK Stack: Elasticsearch, Logstash, Kibana.
  • Top Useful Features Of Linux Mint
  • The Difference Between Brotli And Gzip Compression Algorithms To Speed Up Your Site
  • Top 6 Tools To Search For Memory Under Linux
  • Linux Dedicated Hosting
  • Top Sources That Will Help You Learn Linux
  • Scientific Linux and its features
  • What Scientific Linux is and its features
  • Summary
  • What are Redirects and Benefits of it
  • How To Remotely Connect To Windows Server?
Hosting Services
  • Dedicated Hosting
  • Colocation Hosting
  • Backup
  • IP Transit
  • DDoS Mitigation
Support
  • Portal Login
  • Knowledgebase
  • Community
Company
  • About Us
  • Contact Us
  • Network
  • Data Centers
  • Looking Glass
  • Affiliates
  • Reseller
  • Blog
Policies
  • Privacy Policy
  • Acceptable Usage Policy
  • Terms and Conditions
  • Service Level Agreement
Company
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801
Subscribe to Our Mailing List
* indicates required
Copyright © 2023 Psychz Networks, A Profuse Solutions Inc Company