•  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

어떻게 찾아 리눅스에서 명령의 위치를 ​​사용하여 파일을 찾는 방법은?

  • Home
  • Client
  • Qa Forum
  • 어떻게 찾아 리눅스에서 명령의 위치를 ​​사용하여 파일을 찾는 방법은?

Posted By: Alex | 1 Replies | Last Reply On: Sep 23, 2015 15:07:17

find command, locate command

How to find a file using  find and locate command on Linux? 

Psychz - Luis

Votes: 0Posted On: Sep 23, 2015 15:07:17
 

The find command is a very useful tool on all Linux and Unix operating systems that is used to find files or all kinds. I am going to give a brief description of how to use it but I highly recommend reading the find man pages to learn more about this awesome tool.

 

1. Searching the entire home directory in search for all files that end with the .txt flags modify on the last 5 days

find /home/* -iname "*.txt" -mtime 5 -print

 

2. Find all files modified less than 24 hours ago

find /home/* -iname "*.txt" -mtime -24 -print

 

3. Find the files modified 60 min ago

find /home/* -iname "*.txt" -cmin -60 -print

 

"perm" Flag - You can add the "-perm" flag to search for particular files with whatever permissions you want, 777, 644, 4777, 2777, 7777. For example, You can add the "-perm" flag to search for particular files with whatever permissions you want, 777, 644, 4777, 2777, 7777. Search all files on/with permissions 777 and then run the -exec command to 'ls -l' the dir.

find /* -perm 777 -exec ls -l {} \;

 

"-exec" command -  The -exec can be used to perform shell commands after searching for a file. You can remove the particular file you search, change permissions or tar it.

-exec shell-command-here {} \;

 

The update command is more simple to use, it is very handy to find all of the same information find command find flags are limited. I recommend reading the man pages, as well running the "updatedb" command to update the locate database before using; otherwise searching won't work for newly installed applications/added files.

 

Was this reply helpful?

Related topics

  • 클라우드 전용 서버 대 호스팅 - 당신은 어떻게 선택 하는가?
  • 전용 서버와 클라우드 서버의 차이점은 무엇입니까?
  • 저렴한 비 관리 전용 서버
  • cVirtual Power Management
  • Uptime Logs
  • The Future of Dedicated Servers: Trends and Predictions
  • Psychz는 런던과 암스테르담에서 유럽 데이터 센터의 출시를 발표
  • NL 전용 서버
  • Learn About Anycast And Some Of Its Advantages And Disadvantages
  • Generate SSH Key
  • GDPR and its impact on hosting industry!
  • FTP Settings
  • Cloud Hosting or Dedicated Server
  • CDN Access Control Security
  • Best Dedicated Server Providers In Dallas: A Comprehensive Guide
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