<?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>list hidden folders &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/list-hidden-folders/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>
	</channel>
</rss>
