Home php教程 PHP开发 find command in linux—find file name

find command in linux—find file name

Dec 14, 2016 pm 05:22 PM

1. Find the file named "elm.cc" in a certain directory

find /home/lijiajia/ -name elm.cc

2. Find the file name containing a certain character (such as "elm") File

find /home/lijiajia/ -name '*elm*'

find /home/lijiajia/ -name 'elm*'

find /home/lijiajia/ -name '*elm'

3. Query based on file characteristics

find /home/lijiajia/ -amin -10 #Find files accessed in the last 10 minutes in the system

find /home/lijiajia/ -atime -2 #Find files accessed in the last 48 hours in the system Files

find /home/lijiajia/ -empty #Find files or folders that are empty in the system

find /home/lijiajia/ -group cat #Find files belonging to groupcat in the system (tried, the command is wrong . )

find /home/lijiajia/ -mmin -5 #Find files modified in the last 5 minutes in the system

find /home/lijiajia/ -mtime -1 #Find files modified in the last 24 hours in the system Files that have passed

find /home/lijiajia/ -nouser #Find files belonging to invalid users in the system (don’t understand what it means)

find /home/lijiajia/ -amin 10 #Find files accessed in the system in the last 10 minutes Files

find /home/ftp/pub -user lijiajia​​​ #Find files belonging to the user lijiajia in the system

(PS: The above operations are all performed under the /home/lijiajia/ folder)

4. Use the hybrid search method to find files

find /tmp -size +10000000c -and -mtime +2 #Find a file in the /tmp directory that is larger than 10000000 bytes and modified within 48 hours

find /tmp -user TOM -OR -User George#Find/TMP directory belongs to the files of Tom or George. Display files

find /home/lijiajia/ -name 'elm.cc' -ls #Find files named "elm.cc" in the directory and display the information of these files

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)