Difference between revisions 507925 and 507926 on knwiki{{other uses}} {{lowercase|title=find}} In [[Unix-like]] and some other [[operating system]]s, <code>'''find'''</code> is a [[command-line utility]] that [[Search engine (computing)|searches]] through one or more [[directory tree]]s of a [[file system]], locates [[Computer file|file]]s based on some [[user (computing)|user]]-specified criteria and applies a user-specified action on each matched file. The possible search criteria include a [[pattern matching|pattern(contracted; show full) This searches every file on the computer for a file with the name ''myfile'' and prints it to the screen. It is generally not a good idea to look for data files this way. This can take a considerable amount of time, so it is best to specify the directory more precisely. Some operating systems may mount dynamic filesystems that are not congenial to <code>find</code>. ===Search all but one directory subtree=== find / -path excluded_ folderpath -prune -o -type f -name myfile -print This searches every folder on the computer except the subtree ''excluded_folder''path'' (pull path including the leading /), for a file with the name ''myfile''. It will not detect directories, devices, links, doors, or other "special" filetypes. ===Specify a directory=== find /home/weedly -name "myfile" -type f -print This searches for files named ''myfile'' in the ''/home/weedly'' directory, the home directory for userid ''weedly''. You should always specify the directory to the deepest level you can remember. (contracted; show full)[[it:Find (Unix)]] [[hu:Find]] [[ja:Find]] [[pl:Find]] [[pt:Find]] [[ro:Find]] [[ru:Find]] [[fi:Find (Unix)]] All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://kn.wikipedia.org/w/index.php?diff=prev&oldid=507926.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|