Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux system find command Detailed     - Postmodern systems programming language (Programming)

- Vi (Vim) keyboard map and its basic commands (Linux)

- Hadoop configuration ssh automation of automation (Server)

- Linux systems dmesg command processing failures and system information collected seven usage (Linux)

- Installation Android IDE development tools, Android Studio 1.5 under Ubuntu (Linux)

- Linux more command Detailed (Linux)

- Use exp exported EXP-00091 error (Database)

- Linux System Getting Started Learning: The Linux ac command (Linux)

- Ubuntu 12.04 64bit Install Source Insight 3.5 and create desktop icons (Linux)

- MySQL combination Git achieve differential backups can be used in the production environment (Database)

- Use calcurse schedule appointments and to-do in the Linux terminal (Linux)

- MySQL multi-master multi-cluster deployment uses alive Galera (Database)

- Linux Tutorial Share: How to sudo command to define the PATH environment variable (Linux)

- Android imitation UC browser scroll up and down functions (Programming)

- ARP Linux-related operations (Linux)

- Ubuntu 15.04 Linux install anti-virus software Antiviral 0.2 (Linux)

- Linux environment variables inside (Linux)

- Linux FTP setting file description (Server)

- Performance issues under CentOS 6.5 VLAN devices (Linux)

- How to view the Linux graphics hardware information (Linux)

 
         
  Linux system find command Detailed
     
  Add Date : 2018-11-21      
         
         
         
  Find command
- Uses: used to find a file or directory
- Format: find [Look] [search condition]
Common search criteria
--name: by file name lookup
--size: Find by file size
--user: Find by file owner
--type: Find by file type
--print: to \ n newline print out the file (path)
 
Advanced search criteria
--perm: Press the permission lookup
--ctime (-cmin): Press file creation time (in days) to find
--atime (-amin): Access time to find
--mtime (-mmin): Find modification time
--newer: Find updates than the specified file
--delete: delete files that meet the search criteria
-! : Take the inverse operation
--exec: Find and then perform the operation

Operation combat:
Find / tmp directory under the file name and remove core.
core files are temporary files generated by certain applications, a long time will be very consuming storage space,
Further hacker with ulterior motives may make use of the file system damage. Command is as follows:
find / tmp -name core -type f -print | xargs / bin / rm -f
Such commands in the system, the average user at runtime identity is replaced by root,
Should command the class effectively prevent hackers managed to increase some dangerous commands such orders.
Our approach is to find these commands /root/suid.txt and saved to a file, and regular inspection.
Command is as follows:
find / \ (-perm -4000 -fprintf /root/suid.txt '% # m% u% p \ n' \)
Find more than 100M of files throughout the system and saved to /root/big.txt file.
Command is as follows:
find / \ (-size + 100M -fprintf /root/big.txt '$ -10s% p \ n' \)
Find in the current directory and its user group has write access to the file, the command is as follows:
find. -perm -g + w, u + w
Find the name of the system user and group has write access to the directory and the directory to save the user permissions to wdir file.
Command is as follows:
find / \ (-perm -u + w, g + w -type d -fprintf / root / wdir '% m% u% p \ n' \)
Find the entire system and any writable directory, and save the name of the directory, users, permissions to wrap manner to wdir file. Command is as follows:
find / \ (-perm -o + w -type d -fprintf / root / wdir '% m% u% p \ n' \)
Find all the current read and write permissions, but no execute permissions to the directory of files and directories. Command is as follows:
find. -perm -a + r -perm / a + w! -perm / a + x
find support variables, find the $ HOME directory variable, within 24 hours of changed files. Command is as follows:
find $ HOME -mtime 0
Find the file in the current directory and view its file type. Command is as follows:
. Find -type f -exec file '{}' \;
     
         
         
         
  More:      
 
- Automatic batch resolve dependencies problem locally installed rpm package (Linux)
- To create a file in Linux directory by setfacl (Linux)
- Spring AOP for logging (Programming)
- Use Bosh deploy CloudFoundry problems encountered on OpenStack (Server)
- Comparison of sorting algorithms (Programming)
- SQL MySQL query table duplicate data (Database)
- VMware clone Linux find eth0 (Linux)
- Linux cut Command Study Notes (Linux)
- Video editing captions under Linux (Linux)
- How to upgrade the kernel to 3.13.7 on Ubuntu / Linux Mint (Linux)
- Vagrant Getting Start (Linux)
- RHEL5.8 physical opportunities to Read-only file system (Linux)
- Object-C in the preparation of multi-parameter function parameter is omitted (Programming)
- Stunning exclamation point at the Linux command line (Linux)
- Nonstandard IMP-00010 error processing one case (Database)
- TPCC-MySQL Benchmark (Database)
- Ubuntu Apache virtual host configuration (Server)
- Android custom slideshow menu slidmenu (Programming)
- Netcat Example (Linux)
- The difference Docker save and export commands (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.