<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.6bit.ch/index.php?action=history&amp;feed=atom&amp;title=Find</id>
	<title>Find - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.6bit.ch/index.php?action=history&amp;feed=atom&amp;title=Find"/>
	<link rel="alternate" type="text/html" href="http://wiki.6bit.ch/index.php?title=Find&amp;action=history"/>
	<updated>2026-05-10T13:07:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.6bit.ch/index.php?title=Find&amp;diff=98&amp;oldid=prev</id>
		<title>Xbl: Created page with &quot;= find =  Search for files in a directory hierarchy. The command is recursive by default.&lt;/br&gt;  == Use == &lt;code&gt;find /var/www -name '*.css'&lt;/code&gt; prints full path/filename to all files in /var/www that end in .css  &lt;code&gt;-name&lt;/code&gt; filename matches string(case sensitive)&lt;/br&gt; &lt;code&gt;-iname&lt;/code&gt; filename matches string(case insensitive)&lt;/br&gt; &lt;code&gt;-regex&lt;/code&gt; filename matches regex(case sensitive)&lt;/br&gt; &lt;code&gt;-iregex&lt;/code&gt; filename matches regex(case insensitive)&lt;/b...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.6bit.ch/index.php?title=Find&amp;diff=98&amp;oldid=prev"/>
		<updated>2022-12-30T14:07:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= find =  Search for files in a directory hierarchy. The command is recursive by default.&amp;lt;/br&amp;gt;  == Use == &amp;lt;code&amp;gt;find /var/www -name &amp;#039;*.css&amp;#039;&amp;lt;/code&amp;gt; prints full path/filename to all files in /var/www that end in .css  &amp;lt;code&amp;gt;-name&amp;lt;/code&amp;gt; filename matches string(case sensitive)&amp;lt;/br&amp;gt; &amp;lt;code&amp;gt;-iname&amp;lt;/code&amp;gt; filename matches string(case insensitive)&amp;lt;/br&amp;gt; &amp;lt;code&amp;gt;-regex&amp;lt;/code&amp;gt; filename matches regex(case sensitive)&amp;lt;/br&amp;gt; &amp;lt;code&amp;gt;-iregex&amp;lt;/code&amp;gt; filename matches regex(case insensitive)&amp;lt;/b...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= find =&lt;br /&gt;
&lt;br /&gt;
Search for files in a directory hierarchy. The command is recursive by default.&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use ==&lt;br /&gt;
&amp;lt;code&amp;gt;find /var/www -name '*.css'&amp;lt;/code&amp;gt; prints full path/filename to all files in /var/www that end in .css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-name&amp;lt;/code&amp;gt; filename matches string(case sensitive)&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-iname&amp;lt;/code&amp;gt; filename matches string(case insensitive)&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-regex&amp;lt;/code&amp;gt; filename matches regex(case sensitive)&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-iregex&amp;lt;/code&amp;gt; filename matches regex(case insensitive)&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-type x&amp;lt;/code&amp;gt; define result type&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-type b&amp;lt;/code&amp;gt; block device&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-type c&amp;lt;/code&amp;gt; character device&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-type d&amp;lt;/code&amp;gt; directory&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-type f&amp;lt;/code&amp;gt; file&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-type l&amp;lt;/code&amp;gt; symlink&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-type p&amp;lt;/code&amp;gt; named pipe&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-type s&amp;lt;/code&amp;gt; socket&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-size x&amp;lt;/code&amp;gt; define file size&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-size -1M&amp;lt;/code&amp;gt; smaller than 1MB&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-size +2G&amp;lt;/code&amp;gt; bigger than 2GB&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-size +1M -size -10M&amp;lt;/code&amp;gt; bigger than 1M and smaller than 10M&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-mtime x&amp;lt;/code&amp;gt; define modification time&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-mtime -5&amp;lt;/code&amp;gt; modified five or less days ago&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-mtime +5&amp;lt;/code&amp;gt; modified five or more days ago&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-mtime +5 -mtime -10&amp;lt;/code&amp;gt; modified more than five and less than 10 days ago&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-perm x&amp;lt;/code&amp;gt; define permissions&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-perm 754&amp;lt;/code&amp;gt; match rwx rx r exactly&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-perm /4&amp;lt;/code&amp;gt; match defined permission for either user, group or others&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful Flags ==&lt;br /&gt;
&amp;lt;code&amp;gt;-L&amp;lt;/code&amp;gt; follow symbolic links&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-not&amp;lt;/code&amp;gt; match inverse&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-print0&amp;lt;/code&amp;gt; do not treat whitespace as the end of a filename&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-user x&amp;lt;/code&amp;gt; only match files belonging to specified user&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-exec&amp;lt;/code&amp;gt; execute a command on matched files&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; placeholder to represent matched file&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;\;&amp;lt;/code&amp;gt; indicate the end of a parameter list&amp;lt;/br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xbl</name></author>
	</entry>
</feed>