Find best application find path-option [-print] [-exec-OK command] {}\;-print outputs the searched files to the standard output-exec command {}\; execute the command operation on the retrieved file. The space between {} And \; is the same as that between-OK and-exec, you only need to consult the user www.2cto.com ================================ =================================- name filename #
Article Title: file search methods in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Each operating system is composed of thousands of different types of files. There are system files, user files, shared files, and so on. Sometimes we often forget where a file is stored on the hard disk. Searching for a file in Microsoft's Windows operating system is
4.findThe Linux Find command searches the directory structure for files and performs the specified actions. The Linux Find command provides quite a lot of search criteria and is powerful. Because find has powerful features, it has a lot of options, most of which are worth taking the time to look at. Even if the system contains a network file system (NFS), the
Article title: Shell basics: Chapter 2 use find and xargs. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author:
Sorting: lanlingsheng
Sometimes you may need to search for files with certain characteristics in the system (such as file permissions, file owner, file length, file type, and so on ). There may be m
This article describes in detail some common parameters and examples of the find command in linux, as well as some specific usage and precautions. if you need it, refer to the "LinuxFind" tab.
1. use the name option:The file name option is the most common option for the find command. you can either use this option independently or use it with other options.You can use a certain file name pattern to match th
Each operating system is composed of thousands of different types of files. There are system files, user files, shared files, and so on. Sometimes we often forget where a file is stored on the hard disk. Searching for a file in Microsoft's Windows operating system is quite simple. You only need to click "start"-"Search" on the desktop, and then you can find a file on the local hard disk in various ways, local Network, and even search for various files
Xargs:
Find-type f-name "*.UNL" | Xargs awk-f "|" ' {if ($1== "221") {print $ > ' log/' FILENAME} '
When you use the-e x E c option of the f i n d command to process a matching file, the Find command passes all matching files to E x e C for execution. However, some systems have a limit on the length of the command that can be passed to E x e C , so that an overflow error occurs after the f i n d command r
Each operating system is composed of thousands of different types of files. There are system files, user files, shared files, and so on. Sometimes we often forget where a file is stored on the hard disk. Searching for a file in Microsoft's Windows operating system is quite simple. You only need to click "start"-"Search" on the desktop, and then you can find a file on the local hard disk in various ways, local Network, and even search for various files
Shell basics 2: Search Skills, use of find and xargs
Execute shell commands using exec or OKWhen using find, you only need to write the desired operation in a file, you can use exec to search with find, which is very convenient.(In some operating systems, only the-e x e c option is allowed to execute commands such as l s or
Because find has powerful functions, there are many options, and most of them are worth the time to understand. Even if the system contains a Network File System (NFS), the find command is equally valid in the file system, and you only have the corresponding permissions.
When running a find command that consumes a lot of resources, many people tend to put it in t
Reprinted from http://blog.chinaunix.net/u1/53398/showart_478990.html
Because find has powerful functions, there are many options, and most of them are worth the time to understand. Even if the system contains a Network File System (NFS), the find command is equally valid in the file system, and you only have the corresponding permissions.
When running a find c
Ps:find is a powerful command that matches the regular and finds the corresponding permissions, which can help you pinpoint files in any directory anywhere in your system. The following is the most detailed article on the use of the Find command, recorded. Also have to note: The semicolon in this article, in fact, are all with the escape character \;, may be the template problem, backstage display but the front desk did not show up. For different syst
one, find command format1. The general form of the Find command is;find Pathname-options [-print-exec-ok ...]2, the parameters of the Find command;
The directory path that the Pathname:find command looks for. For example, use. To represent the current directory, and/to represent the system root directory.
In addition to basic operations like searching for files in a directory structure, you can also use the find command to perform some practical operations to make your command line easier.
This article will introduce 15 Linux find commands that are useful for beginners and laruence.
First, create the following empty file under your home directory to test the following fi
==================== instance ==============Delete all. SVN directoriesThat's what I was looking for to find the Linux find command.1) Find. -type d-name '. SVN ' | Xargs rm-rf #先 (Recursive) Find the file directory under the current path that contains. SVN, and then kill each one by Xargs.# (processing is done one by
Linux under Find command instance
$find ~-name "*.txt"-print #在 $HOME to check the. txt file and display the
$find. -name "*.txt"-print
$find. -name "[a-z]*"-PRI26NBSP; #对匹配的文件使用cpio命令, back them up to the
tape device-prune #忽略某个目录
$find. -name "[a-z]*"-print #查以大写
1, the general form of Find command;
Find Pathname-options [-print-exec-ok ...]
1. Find
Find is the most common and powerful search command you can use to find any file you're looking for.
Find uses the following format:
$
Ubuntu file search method (find command) common format: findpathname-options [-print-exec-OK] example: find-namefilename then search for the findetc-name * s file named filename in the root directory. search for the ubuntu search file method (find command) with s in the directory in the common format: find pathname-opt
Find some common examples of common parameters and some specific usage and considerations.1. Use the name option:The file name option is the most common option for the Find command, either used alone or in conjunction with other options.You can use a file name pattern to match files, remembering to enclose the filename pattern in quotation marks. No matter what the current path is, if you want to
Format of the Find command: Find [-path]-options [-print-exec-ok]
Path
: The directory path to find.
~ Represents the $home directory
. Indicates the current directory
/represents the root directory
-print: Indicates output of the result to standard output
-exec: Executes the shell comm
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.