<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>linux find command &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/linux-find-command/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Thu, 08 Sep 2011 03:36:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>10 Linux Find Command Examples</title>
		<link>https://lifelinux.com/10-linux-find-command-examples/</link>
					<comments>https://lifelinux.com/10-linux-find-command-examples/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Thu, 08 Sep 2011 02:42:39 +0000</pubDate>
				<category><![CDATA[Bash Shell]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[cli command directory file find grep linux linux-unix locate regex search]]></category>
		<category><![CDATA[find command example]]></category>
		<category><![CDATA[linux find command]]></category>
		<category><![CDATA[linux find example]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1168</guid>

					<description><![CDATA[<p>The Linux find command is very powerful. It can search the entire filesystem to find files or directories according to the search criteria that you specify. In this article, I&#8217;ll show 10 examples of Linux find command that will be very useful to both newbies and experts. 1. Find files using name # find /etc [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/10-linux-find-command-examples/">10 Linux Find Command Examples</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>The Linux <strong>find command</strong> is very powerful. It can search the entire filesystem to find files or directories according to the search criteria that you specify. In this article, I&#8217;ll show 10 examples of Linux <strong>find command</strong> that will be very useful to both newbies and experts.<span id="more-1168"></span></p>
<h2>1. Find files using name</h2>
<pre># find /etc -name passwd</pre>
<p>Sample ouputs</p>
<pre>/etc/cron.daily/passwd
/etc/passwd
/etc/pam.d/passwd</pre>
<h2>2. Find files using name and ignoring case</h2>
<pre># find /etc -iname Passwd</pre>
<p>Sample ouputs</p>
<pre>/etc/cron.daily/passwd
/etc/passwd
/etc/pam.d/passwd</pre>
<h2>3. Find files based on file type</h2>
<p>Find only the socket files</p>
<pre># find . -type s</pre>
<p>Find all directories</p>
<pre># find . -type d</pre>
<p>Find only the normal files</p>
<pre># find . -type f</pre>
<h2>4. Find files by modification time</h2>
<pre># find . -mtime -7</pre>
<p>Sample outputs</p>
<pre>./.dbus/session-bus/c08a8197eb71b09ea24402430000000a-0
./.macromedia/Flash_Player/macromedia.com/support/flashplayer/sys
...</pre>
<h2>5. Find Files by Size</h2>
<p>Find files bigger than 100MB</p>
<pre># find /var -size +100M</pre>
<p>Sample outputs</p>
<pre>/var/lib/mysql/ibdata1
...</pre>
<p>Find files smaller than 100MB</p>
<pre># find /var -size -100M</pre>
<p>Sample outputs</p>
<pre>/var/cache/debconf/templates.dat-old
/var/cache/debconf/passwords.dat
/var/cache/debconf/templates.dat
/var/cache/debconf/config.dat
...</pre>
<h2>6. Find files using permission</h2>
<pre># find /var -perm 777</pre>
<p>Sample outputs</p>
<pre>/var/spool/mail
/var/run/mysqld/mysqld.sock
/var/run/avahi-daemon/socket
/var/run/dbus/system_bus_socket
...</pre>
<h2>7. Find and delete</h2>
<p>Clean PHP files</p>
<pre># find . -iname "*.php" -exec rm -rf {} \;</pre>
<p>Or</p>
<pre># find . -iname "*.php" -print | xargs rm –f</pre>
<h2>8. Find all empty files</h2>
<pre># find /var -empty</pre>
<p>Sample outputs</p>
<pre>/var/opt
/var/cache/pm-utils
/var/cache/pppconfig
/var/cache/jetty
/var/cache/apt/archives/lock
...</pre>
<h2>9. Finding files only in current directory not finding on sub directories</h2>
<pre># find /etc -maxdepth 1 -name passwd</pre>
<p>Sample outputs</p>
<pre>/etc/passwd</pre>
<h2>10. Find files with different file extensions</h2>
<pre># find / -type f \( -name "*.php" -o -name "*.php5" \)</pre>
<p>Sample outputs</p>
<pre>/var/cache/dictionaries-common/sqspell.php
/var/cache/dictionaries-common/sqspell.php5
..</pre>
<g:plusone href="https://lifelinux.com/10-linux-find-command-examples/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/10-linux-find-command-examples/">10 Linux Find Command Examples</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/10-linux-find-command-examples/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
