-bash: / bin / grep: Argument list too long and find: Arguments to -type should contain only one letter error process

Because too many files you're looking for

Filtered into specific times of the day only to find within the file

find ./ -mtime -1|xargs grep 5004964452 

 

Find .php file in the last 30 minute changes the current directory 

the Find -name. ' * .Php ' -mmin - 30 

Find Last 24 hours a modified .php file in the current directory of 

the Find . -Name ' * .php ' -mtime 0 

Find .php file in the current directory Last 24 hours to modify, and list details 

the Find -name. ' * .inc ' -mtime 0 - LS 

Find the current directory, Last 24 - 48 hours of conventional modified file. 

the Find . The -type f -mtime 1 

Find a modified directory, the last day before the current regular file. 

Find . -mtime F + -type . 1

 

· Find    path -option [-print] [-exec - OK Command] {} \; 

parameters find command; 

pathname: directory path find command to find. For example. To indicate the current directory, / is represented root system.
- Print: the output file will match the find command to standard output.
-exec: find command to execute shell commands given by the parameter file match. Form of these commands as ' Command ' {} \} and {Note ;, \; space between.
-ok: and - the role of exec same, but in a more secure mode to execute shell commands given by the parameter before executing each command will prompt allows users to determine whether to execute. 
# - Print the found files to standard output 
# - Exec command {} \; - found in the command file execution operation, and {} \; space between 
# -OK and - the same Exec, but before the operation to the user query 
 
example: the Find -name the .svn |. xargs RM - the RF

 =============================================== ===== 

- name filename # find a file called filename
 - Perm # by executing authority to find
 - the User username # by file owner to find
 - group GROUPNAME # in groups to find
 -mtime -n + n # press file change the time to find the file, -n refers to within n days, + n n refers days ago
 -atime -n + n # by file access times to check GIN: 0px " >
 
-ctime -n + n # by file creation time to find file, -n means within n days, + n refers to n days ago
 -nogroup # search file is a group of non-active, i.e. is a group of files in / etc / absence groups in
 -nouser # no valid search file owner, i.e., the owner of the file in / etc / does not exist in passwd
! -newer f1 f2 find the file, -n refers to within n days, + n n refers days ago 
 -ctime -n + n # by file creation time to find the file, -n refers to within n days, + n n refers days ago 
 - nogroup # investigation file without a valid genus group, i.e. belongs to the group of files in / etc / absence groups in
 -nouser # no valid search file owner, i.e. the main document in / etc / the passwd does not exist
 -newer f1 ! f2 # f1 longer than the new change check, but files older than f2
 -type B / D / C / P / L / F # is a check block device, directory, character devices, pipes, symbolic links, normal file
 - size n-[ c] # search block length n [n bytes or] file
 - depth # make finding before entering the catalog subdirectory look ahead End
 - FStype # Charles change but the old time than f1 than f2 new file
 -type b / D / C / P / L / F # is a check block device, directory, character devices, pipes, symbolic links, Trivial file
 -size n [c] # search block length n [n bytes or] file
 - depth # make finding before entering the catalog subdirectory look-ahead Ends
 -fstype # check file located in a certain type of file system, the files the type of system usually in / etc / fstab found
 - mount                        does not cross file system mount point # check file
 - the Follow # If you have a symbolic link file, you trace file link within the meaning of
 -cpio%; # located at a certain type of investigation file system files, these file system types usually in / etc / found in fstab
 - mount                        does not cross file system mount point # check file
 - the Follow # If you have a symbolic link file, you referred to the trace file links
 - cpio # use cpio command files that match, they will be backed up to tape devices
 - Prune # ignore a directory

================================================== === 
$ the Find    ~ -name    " * .txt "    - Print # to search in $ HOME .txt file and displays 
$ the Find    -name.    " * .txt "    - Print 
$ the Find    . -name    " [AZ] * "    - print # check file with a capital letter at the beginning of 
$ the Find    / etc -name    " Host * "    - the beginning of the investigation file to host print # 
$ the Find    . -name    " [az] [az] [0-9] [0-9] .txt "     -and two check print # to begin two lower-case alphanumeric txt file 
$ Find . -perm    755    - Print 
$ Find    -perm -. 007    -exec LS -l {} \; # search all users perform read and write files with -perm 777 
$ Find    -type D -. Print 
$ Find    -type D -.! Print 
$ Find    . -type L - Print 

$ Find    . -size + 1000000c - Print check # of length greater than 1Mb file 
$ Find    . - 100c size - Print # check file length 100c of 
$ the Find    -size +.10    -print check # of obsolete file exceeds the length of 10 (a = 512 bytes) 

$ CD / 
$ Find    etc Home Apps -depth -print | -ivcdC65536 the cpio -o / dev / rmt0 
$ Find    / etc -name " * passwd "    -exec grep    " cnscn "    {} \; # see if there cnscn user 
$ the Find -name. " yao * "    | xargs  File 
$ the Find    -name. " yao * "    |    xargs    echo     " " > / tmp / Core .log 
$ The Find    -name. " Yao * "    | xargs    chmod    O- w
 
=================================== =================== the Find    -name april *                      Find april files in the current directory beginning of
 the Find    -name april * fprint file         looks in the current directory to the beginning of april file and output the results to a file in
 the Find    -name ap * * -o -name may    look to ap or file may begin with
 the Find    mnt -name tom.txt -ftype vfat / at / look for a tom.txt and under mnt file system type vfat file
 the Find    / mnt -name t.txt! -ftype vfat in / look for a tom.txt and the file system type vfat file is not under mnt
 the Find

    / tmp -name * the -type L WA in / Find the file named wa at the beginning and it's a symbolic link under the tmp
 the Find    / Home -mtime - 2                  in / check altered in the last two days file Home
 the Find / Home -atime - 1                   is accessed through the file within Zha 1 day
 find / Home -mmin + 60                   in / checked 60 minutes before the altered file Home
 find / Home -amin + 30                   check latest 30 minutes before the accessed file.
 find / home -newer tmp.txt in / at home than to check updated files or directories tmp.txt near
 the Find / -anewer tmp.txt at home / at home to check access time than tmp.txt close the file or directory
 the Find    / -Used Home - 2                   lists the file or directory is after the change over, within 2 days accessed through the file or directory
Find    / home -user cnscn lists / users belonging cnscn file or directory within the home directory
 Find    / home -uid + 501                   lists / within the user's home directory 501 is greater than the identification code of the file or directory
 Find    / home listed -group cnscn / home group cnscn the file or directory
 Find    / home -gid 501                    lists / home group id of the file or directory 501
 Find    / -nouser listed home / not belong to the local user in the home file or directory
 Find    / home List -nogroup / not belonging to the file or directory in the local group home
 find    / home -name tmp.txt -maxdepth    . 4    lists / findWhen the check in the home tmp.txt depth up to 3 layers
   / Home -name tmp.txt -mindepth    . 3    from the second layer began to check
 Find    / Home - empty lookup file size is 0 or a empty directory
 Find    / Home -size + 512k 512k greater than the search file
 Find    / Home -size - 512k Charles the file is smaller than 512k
 Find    / Home -links + 2                 search hardwired number greater than 2, file or directory
 Find    / Home -perm    0700                 check permissions for the file or directory 700
 Find    / tmp -name tmp.txt -exec CAT {} \;
 Find    / tmp -name tmp.txt -OK    RM {} \; 

Find     / -amin - 10      # access system to find the last 10 minutes of the file
 find     / -atime - 2         # Find access the last 48 hours in a file system
 find     / - empty # find empty in the system file or folder
 find     / -group    CAT         # find files in the system belongs to groupcat
 the Find     / -mmin - 5          # find the last 5 minutes of modified files in the system
 the Find     / -mtime - 1        # Find the last 24 hours modified in the system file
 the Find     / - nouser # Find belonging to void the user's file system in
 the Find     / -user fred # find fRED belong to the user's file system

 

Transfer from

Find recently modified files with find command under Linux system - luckyall - blog https://www.cnblogs.com/luckyall/p/8039868.html Park

 

Guess you like

Origin www.cnblogs.com/paul8339/p/11541679.html