<?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>find command &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/find-command/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Fri, 29 Aug 2014 08:50:06 +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>Centos: How To List All / Delete Hidden Files Recursively ?</title>
		<link>https://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/</link>
					<comments>https://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 29 Aug 2014 08:47:54 +0000</pubDate>
				<category><![CDATA[Bash Shell]]></category>
		<category><![CDATA[File System]]></category>
		<category><![CDATA[find command]]></category>
		<category><![CDATA[list hidden files]]></category>
		<category><![CDATA[list hidden folders]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1925</guid>

					<description><![CDATA[<p>I need to find and list all hidden files including directories on a Linux server (CentOS). How can I recursively list all hidden files and directories? How do I save result in a text file? And How do I delete all hidden files/directories ? Using the find command to list all hidden files recursively # [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/">Centos: How To List All / Delete Hidden Files Recursively ?</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>I need to find and list all hidden files including directories on a Linux server (CentOS). How can I recursively list all hidden files and directories? How do I save result in a text file? And How do I delete all hidden files/directories ?<br />
<span id="more-1925"></span></p>
<h2>Using the find command to list all hidden files recursively</h2>
<pre>
# find <path> -name ".*" -print
</pre>
<p>Example</p>
<pre>
# find /etc/ -name ".*" -print
/etc/skel/.bashrc
/etc/skel/.bash_logout
/etc/skel/.bash_profile
/etc/.pwd.lock
</pre>
<p>Or, </p>
<pre>
# find <path> -name ".*" -ls
</pre>
<p>Example</p>
<pre>
# find /etc/ -name ".*" -ls
1310797    4 -rw-r--r--   1 root     root          124 May 11  2012 /etc/skel/.bashrc
1310794    4 -rw-r--r--   1 root     root           18 May 11  2012 /etc/skel/.bash_logout
1310796    4 -rw-r--r--   1 root     root          176 May 11  2012 /etc/skel/.bash_profile
1310854    0 -rw-------   1 root     root            0 Dec 12  2012 /etc/.pwd.lock
</pre>
<p>If you only want to search only hidden files:</p>
<pre>
# find <path> -type f -iname ".*" -ls
</pre>
<p>Example</p>
<pre>
# find /usr -type f -iname ".*" -ls
8915163    4 -rw-r--r--   1 root     root          760 Sep 19  2012 /usr/share/man/man5/.k5login.5.gz
8651596    4 -rw-r--r--   1 root     root           40 May 11  2012 /usr/share/man/man1/..1.gz
8654188    4 -rw-r--r--   1 root     root         2438 Aug 25 14:29 /usr/local/lib/php/.depdb
8654187    0 -rw-r--r--   1 root     root            0 Aug 25 14:29 /usr/local/lib/php/.depdblock
8654186    0 -rw-r--r--   1 root     root            0 Aug 25 14:29 /usr/local/lib/php/.lock
...
</pre>
<p>Or, If you only want to search only hidden directories:</p>
<pre>
find <path> -type d -iname ".*" -ls
</pre>
<p>Example</p>
<pre>
# find /usr -type d -iname ".*" -ls
8654180    4 drwxr-xr-x   3 root     root         4096 Dec 12  2012 /usr/local/lib/php/.channels
8785283    4 drwxr-xr-x   2 root     root         4096 Dec 12  2012 /usr/local/lib/php/.channels/.alias
8654179    4 drwxr-xr-x   5 root     root         4096 Dec 12  2012 /usr/local/lib/php/.registry
...
</pre>
<p>To remove all hidden files recursively</p>
<pre>
# find <path> -type f -iname ".*" -print0 | xargs -0 rm -f
</pre>
<p>Example</p>
<pre>
# Delete all hidden files of apache server
# find /var/www/html -type f -iname ".*" -print0 | xargs -0 rm -f
</pre>
<g:plusone href="https://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/">Centos: How To List All / Delete Hidden Files Recursively ?</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/centos-how-to-list-all-delete-hidden-files-recursively/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Flush Sendmail Queue In Linux</title>
		<link>https://lifelinux.com/how-to-flush-sendmail-queue-in-linux/</link>
					<comments>https://lifelinux.com/how-to-flush-sendmail-queue-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Mon, 16 May 2011 00:40:04 +0000</pubDate>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[/var/spool/mqueue]]></category>
		<category><![CDATA[Check pending mail]]></category>
		<category><![CDATA[delete sendmail queue]]></category>
		<category><![CDATA[find command]]></category>
		<category><![CDATA[Flush Sendmail Queue]]></category>
		<category><![CDATA[mailq command]]></category>
		<category><![CDATA[sendmail restart]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=574</guid>

					<description><![CDATA[<p>Check pending mail To check how many pending mail, type the following command # mailq This will give you example output like this: /var/spool/mqueue (2 requests) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- p4BHPCuP002174 105 Thu May 12 00:25 mualaco (host map: lookup (nixonbox.com): deferred) pedromelon@nixonbox.com p4B8uNPZ023735 1000 Wed May 11 15:56 saigonlab (host map: lookup (gmail.com.vn): deferred) [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-flush-sendmail-queue-in-linux/">How To Flush Sendmail Queue In Linux</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><h3>Check pending mail</h3>
<p>To check how many pending mail, type the following command</p>
<pre>
# mailq
</pre>
<p><span id="more-574"></span><br />
This will give you example output like this:</p>
<pre>
 /var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
p4BHPCuP002174      105 Thu May 12 00:25 mualaco
                 (host map: lookup (nixonbox.com): deferred)
                                         pedromelon@nixonbox.com
p4B8uNPZ023735     1000 Wed May 11 15:56 saigonlab
                 (host map: lookup (gmail.com.vn): deferred)
                                         tranhai.ht.83@gmail.com.vn
                Total requests: 2
</pre>
<p>There are several techniques to delete sendmail queue</p>
<h3>Manually removed pending mails</h3>
<p>Type the following commands</p>
<pre>
# rm -rf /var/spool/mqueue
# rm -rf /var/spool/clientmqueue
</pre>
<p>Final, restart mail service with the following command</p>
<pre>
# /etc/init.d/sendmail restart
</pre>
<p>Output like this</p>
<pre>
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]
</pre>
<p>You can also use find command to remove &#8220;Deferred: Connection refused&#8221; queues</p>
<pre>
# find /var/spool/mqueue -type f -exec grep "Deferred: Connection refused" {} \; -exec rm -rf {} \;
</pre>
<g:plusone href="https://lifelinux.com/how-to-flush-sendmail-queue-in-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-flush-sendmail-queue-in-linux/">How To Flush Sendmail Queue In Linux</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/how-to-flush-sendmail-queue-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Find Large Files In Linux</title>
		<link>https://lifelinux.com/find-large-files-in-linux/</link>
					<comments>https://lifelinux.com/find-large-files-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 13 May 2011 15:54:44 +0000</pubDate>
				<category><![CDATA[Bash Shell]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[find command]]></category>
		<category><![CDATA[Find files larger than a certain size]]></category>
		<category><![CDATA[Find files within specified size limits]]></category>
		<category><![CDATA[Find Large Files]]></category>
		<category><![CDATA[ls command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=478</guid>

					<description><![CDATA[<p>Find files larger than a certain size This example finds all the files under /root directory which are larger than 50k [root@lifelinux ~]# find /root -size +50k Sample output /root/ioncube/ioncube_loader_lin_5.3_ts.so /root/ioncube/ioncube_loader_lin_4.1.so /root/ioncube/ioncube_loader_lin_5.1.so /root/ioncube/ioncube_loader_lin_4.2.so ... Find files within specified size limits Example, type the following command to limit the search to find only files with the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/find-large-files-in-linux/">Find Large Files In Linux</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><h3>Find files larger than a certain size</h3>
<p>This example finds all the files under /root directory which are larger than 50k</p>
<pre>[root@lifelinux ~]# find /root -size +50k</pre>
<p>Sample output</p>
<pre>/root/ioncube/ioncube_loader_lin_5.3_ts.so
/root/ioncube/ioncube_loader_lin_4.1.so
/root/ioncube/ioncube_loader_lin_5.1.so
/root/ioncube/ioncube_loader_lin_4.2.so
...</pre>
<p><span id="more-478"></span></p>
<h3>Find files within specified size limits</h3>
<p>Example, type the following command to limit the search to find only files with the size of 50k to 100k</p>
<pre>[root@lifelinux ~]# find /var/log -size +50k -size -100k</pre>
<p>Sample output</p>
<pre>/var/log/secure.2
/var/log/munin/munin-node.log
/var/log/munin/munin-limits.log
...</pre>
<p>If you want to list them with ls, type the following command</p>
<pre>[root@lifelinux ~]# find /var/log -size +50k -size -100k -exec ls -lha {} \;</pre>
<p>Sample output</p>
<pre>-rw------- 1 root root 59K Apr 30 22:01 /var/log/secure.2
-rw-r--r-- 1 root root 54K May 13 23:05 /var/log/munin/munin-node.log
-rw-r--r-- 1 munin munin 94K May 13 23:05 /var/log/munin/munin-limits.log</pre>
<h3>Further readings</h3>
<p><a href="http://linux.about.com/od/commands/l/blcmdl1_find.htm">Find command</a></p>
<g:plusone href="https://lifelinux.com/find-large-files-in-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/find-large-files-in-linux/">Find Large Files In Linux</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/find-large-files-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
