<?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>File System &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="http://lifelinux.com/category/file-system/feed/" rel="self" type="application/rss+xml" />
	<link>http://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.9</generator>
	<item>
		<title>Centos: How To List All / Delete Hidden Files Recursively ?</title>
		<link>http://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/</link>
					<comments>http://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="http://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="http://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="http://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://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="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/centos-how-to-list-all-delete-hidden-files-recursively/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Mount A ISO Image Under Linux</title>
		<link>http://lifelinux.com/how-to-mount-a-iso-image-under-linux/</link>
					<comments>http://lifelinux.com/how-to-mount-a-iso-image-under-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 27 May 2011 06:10:38 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[cd command]]></category>
		<category><![CDATA[cd iso]]></category>
		<category><![CDATA[how to mount iso]]></category>
		<category><![CDATA[iso images]]></category>
		<category><![CDATA[linux loopback device]]></category>
		<category><![CDATA[linux mount iso]]></category>
		<category><![CDATA[linux mount iso image]]></category>
		<category><![CDATA[loop module]]></category>
		<category><![CDATA[mkdir command]]></category>
		<category><![CDATA[mount command]]></category>
		<category><![CDATA[mount iso]]></category>
		<category><![CDATA[mount iso image]]></category>
		<category><![CDATA[mount iso image linux]]></category>
		<category><![CDATA[mount iso in linux]]></category>
		<category><![CDATA[mount iso linux]]></category>
		<category><![CDATA[mount iso loop]]></category>
		<category><![CDATA[path linux]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=841</guid>

					<description><![CDATA[<p>An ISO image (International Organization for Standardization) is an archive file (also known as a disc image) of an optical disc, composed of the data contents of every written sector of an optical disc, including the optical disc file system. ISO images can be created from optical discs, or can be used to recreate optical [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-mount-a-iso-image-under-linux/">How To Mount A ISO Image Under Linux</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>An ISO image (International Organization for Standardization) is an archive file (also known as a disc image) of an optical disc, composed of the data contents of every written sector of an optical disc, including the optical disc file system. ISO images can be created from optical discs, or can be used to recreate optical discs using software from many software vendors. ISO image files typically have a file extension of .iso. The name ISO is taken from the ISO 9660 file system used with CD-ROM media, but an ISO image might also contain a UDF (ISO/IEC 13346) file system.<br />
<span id="more-841"></span><br />
To mount an ISO image under Linux, you need simply to do the following steps.</p>
<p>Step 1. You must be logged in as root. If not root user then switch to root user using following command:</p>
<pre>
$ sudo -i
</pre>
<p>If you are using RedHat / CentOS / Fedora</p>
<pre>
$ su
</pre>
<p>Step 2. Create a mounpoint, example /mnt/iso</p>
<pre>
# mkdir -p /mnt/iso
</pre>
<p>Step 3. Use <strong>mount command</strong> as follows to mount iso file called image.iso</p>
<pre>
# mount -o loop image.iso /mnt/iso
</pre>
<p><strong>Where,</strong><br />
-o: Options are specified with a -o flag followed by a comma separated string of options. Some of these options are only useful when they appear in the /etc/fstab file. (<a href="http://linux.about.com/od/commands/l/blcmdl8_mount.htm">More</a>)</p>
<p>loop: A loop device is a pseudo-device that makes a file accessible as a block device. Loop devices are often used for CD ISO images and floppy disc images. Mounting a file containing a filesystem via such a loop mount makes the files within that filesystem accessible. They appear in the mount point directory using above commands.</p>
<g:plusone href="http://lifelinux.com/how-to-mount-a-iso-image-under-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-mount-a-iso-image-under-linux/">How To Mount A ISO Image Under Linux</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/how-to-mount-a-iso-image-under-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Password Protect Files</title>
		<link>http://lifelinux.com/linux-password-protect-files/</link>
					<comments>http://lifelinux.com/linux-password-protect-files/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 27 May 2011 01:22:04 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[access control list]]></category>
		<category><![CDATA[command line tool]]></category>
		<category><![CDATA[cryptographic software]]></category>
		<category><![CDATA[cryptography toolkit]]></category>
		<category><![CDATA[decrypt files]]></category>
		<category><![CDATA[digital signatures]]></category>
		<category><![CDATA[encrypt]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[file permissions]]></category>
		<category><![CDATA[gnu privacy guard]]></category>
		<category><![CDATA[gnupg]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[gpg command]]></category>
		<category><![CDATA[input file]]></category>
		<category><![CDATA[key management]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mcrypt command]]></category>
		<category><![CDATA[network protocols]]></category>
		<category><![CDATA[passphrase]]></category>
		<category><![CDATA[password protect files]]></category>
		<category><![CDATA[secure communication]]></category>
		<category><![CDATA[secure sockets layer]]></category>
		<category><![CDATA[transport layer security]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[unix computer security]]></category>
		<category><![CDATA[unix crypt]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=811</guid>

					<description><![CDATA[<p>If you store private information on your Linux system and you want to prevent other people who use the system from viewing your private files, you need to password protect these files. Solution is to use following commands to encrypt or decrypt files with a password. gpg command GnuPG is the GNU project&#8217;s complete and [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/linux-password-protect-files/">Linux Password Protect Files</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>If you store private information on your Linux system and you want to prevent other people who use the system from viewing your private files, you need to password protect these files. Solution is to use following commands to encrypt or decrypt files with a password.<span id="more-811"></span></p>
<h3>gpg command</h3>
<p><strong>GnuPG</strong> is the GNU project&#8217;s complete and free implementation of the OpenPGP standard as defined by RFC4880. GnuPG allows to encrypt and sign your data and communication, features a versatile key management system as well as access modules for all kinds of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications.</p>
<p>To encrypt a file, use command gpg as follows:</p>
<pre>$ gpg -c filename</pre>
<p>Example, to encrypt private.txt file, type the command</p>
<pre>$ gpg -c private.txt</pre>
<p>Output</p>
<pre>Enter passphrase:
Repeat passphrase:</pre>
<p><strong>Where,</strong><br />
-c : Encrypt with symmetric cipher.</p>
<p>To decrypt file use gpg command</p>
<pre>$ gpg private.txt.gpg</pre>
<p>Output:</p>
<pre>gpg private.txt.gpg
gpg: CAST5 encrypted data
Enter passphrase:</pre>
<h3>mcrypt command</h3>
<p><strong>Mcrypt</strong> is a simple crypting program, a replacement for the old unix crypt. When encrypting or decrypting a file, a new file is created with the extension .nc and mode 0600. The new file keeps the modification date of the original. The original file may be deleted by specifying the -u parameter.</p>
<p>Examples, to encrypt data.txt file, type the following command</p>
<pre>$ mcrypt data.txt</pre>
<p>Output:</p>
<pre>Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase:
Enter passphrase:</pre>
<p><strong>Note</strong> that a new file is created with the extension .nc.</p>
<p>To decrypt the data.txt.nc file, enter</p>
<pre>$ mcrypt -d data.txt.nc</pre>
<p>Output:</p>
<pre>Enter passphrase:
File data.txt.nc was decrypted.</pre>
<g:plusone href="http://lifelinux.com/linux-password-protect-files/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/linux-password-protect-files/">Linux Password Protect Files</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/linux-password-protect-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Hard Disk Speed Tests</title>
		<link>http://lifelinux.com/linux-hard-disk-speed-tests/</link>
					<comments>http://lifelinux.com/linux-hard-disk-speed-tests/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sun, 08 May 2011 10:35:52 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[check hard disk speed]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[dd command test hdd]]></category>
		<category><![CDATA[hard disk speed]]></category>
		<category><![CDATA[HDD benchmark on linux]]></category>
		<category><![CDATA[hdparm]]></category>
		<category><![CDATA[hdparm command]]></category>
		<category><![CDATA[List Hard Drives]]></category>
		<category><![CDATA[test speed hdd]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=332</guid>

					<description><![CDATA[<p>While having a large hard drive is good for storing lots of data, it is also important for your computer to have a fast hard drive. Faster hard drives help your computer run more smoothly. You can use the hdparm tool or dd command to determine your disk speeds from the Linux command line. List [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/linux-hard-disk-speed-tests/">Linux Hard Disk Speed Tests</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>While having a large hard drive is good for storing lots of data, it is also important for your computer to have a fast hard drive. Faster hard drives help your computer run more smoothly. You can use the hdparm tool or dd command to determine your disk speeds from the Linux command line.<br />
<span id="more-332"></span></p>
<h3>List Hard Drives</h3>
<p>Open a terminal or go to a command line on your Linux system. As root, run the command:</p>
<pre>
[root@server2 ~]# fdisk -l
</pre>
<p>Sample outputs:</p>
<pre>
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         274     2096482+  83  Linux
/dev/sda3             275         535     2096482+  82  Linux swap / Solaris
/dev/sda4             536       30400   239890612+   5  Extended
/dev/sda5             536       30400   239890581   83  Linux

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14         274     2096482+  83  Linux
/dev/sdb3             275         535     2096482+  82  Linux swap / Solaris
/dev/sdb4             536       30400   239890612+   5  Extended
/dev/sdb5             536       30400   239890581   83  Linux
</pre>
<h3>hdparm command</h3>
<p>You can use the <strong>hdparm command</strong> to check hard disk speed. It provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE/SATA device driver subsystem. Login as the root and enter the following command:</p>
<pre>
[root@server2 ~]# hdparm -tT /dev/sda
</pre>
<p>Sample outputs:</p>
<pre>
/dev/sda:
 Timing cached reads:   29084 MB in  2.00 seconds = 14574.71 MB/sec
 Timing buffered disk reads:  308 MB in  3.01 seconds = 102.36 MB/sec
</pre>
<p><strong>Note:</strong><br />
-t :perform device read timings<br />
-T :perform cache read timings<br />
/dev/sda : Hard disk device file</p>
<h3>dd Command</h3>
<p>You can use the <strong>dd command</strong> as follows to get speed info too:</p>
<pre>
[root@server2 ~]# dd if=/dev/zero of=/tmp/test.img bs=8k count=256k
[root@server2 ~]# rm /tmp/test.img
</pre>
<p>Sample outputs:</p>
<pre>
dd: writing `/tmp/test.img': No space left on device
210779+0 records in
210778+0 records out
1726697472 bytes (1.7 GB) copied, 22.3398 seconds, 77.3 MB/s
</pre>
<g:plusone href="http://lifelinux.com/linux-hard-disk-speed-tests/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/linux-hard-disk-speed-tests/">Linux Hard Disk Speed Tests</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/linux-hard-disk-speed-tests/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SUID, SGID and Sticky Bits</title>
		<link>http://lifelinux.com/suid-sgid-and-sticky-bits/</link>
					<comments>http://lifelinux.com/suid-sgid-and-sticky-bits/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sun, 27 Mar 2011 03:07:02 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[chmod command]]></category>
		<category><![CDATA[find SGID file]]></category>
		<category><![CDATA[Find SUID file]]></category>
		<category><![CDATA[ls command]]></category>
		<category><![CDATA[setting SGID bit]]></category>
		<category><![CDATA[Setting Sticky bit]]></category>
		<category><![CDATA[setting SUID bit]]></category>
		<category><![CDATA[SGID]]></category>
		<category><![CDATA[Sticky Bits]]></category>
		<category><![CDATA[SUID]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=271</guid>

					<description><![CDATA[<p>What are the SUID, SGID and the Sticky Bits? Sticky Bit Lets start with Sticky bit first. Since this is the most simplest to explain. Setting the sticky bit tells Unix that once the concerned application is executed, it should remain in memory. Remember that Unix is a multi-user OS and was mainly designed so [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/suid-sgid-and-sticky-bits/">SUID, SGID and Sticky Bits</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><h2>What are the SUID, SGID and the Sticky Bits?</h2>
<h3>Sticky Bit</h3>
<p>Lets start with Sticky bit first. Since this is the most simplest to explain. Setting the sticky bit tells Unix that once the concerned application is executed, it should remain in memory. Remember that Unix is a multi-user OS and was mainly designed so that multiple users can work simultaneously. Thus the logic used is that a program that exists in memory requires lesser time to start when a new user requests for the same program. Thus when one user has just used a program and then a new user wants to use the same program, the second user doesn&#8217;t have to face a time delay for the program to initialize itself. It would be readily available to him. The concept of the sticky bit was a very useful one, long back when fast disk access and other memory access technologies weren&#8217;t around. But in today&#8217;s age the concept of sticky bit is obsolete, since modern day technology is advanced enough to reduce the time delay while loading applications into the memory. Thus currently the sticky bit is of very little significance. Sticky bit is only associated with executables.<span id="more-271"></span></p>
<h3>SUID (Set User ID) Bit</h3>
<p>Sometime you may faced an error while trying to run any application stating that the application must be &#8216;SUID root&#8217; . You might have been confused that time, but now once you read this article you would no longer find it confusing.</p>
<p>SUID stands for Set User ID. This means that if the SUID bit is set for any application then your user ID would be set as that of the owner of application/file rather than the current user, while running that application. That means in case I have an application whose owner is &#8216; root &#8216; and it has its SUID bit set, then when I run this application as a normal user, that application would still run as root. Since the SUID bit tells Linux that the the User ID root is set for this application and whenever this application executes it must execute as if root was executing it (since root owns this file).</p>
<h3>SGID (Set Group ID) bit</h3>
<p>Just like SUID, setting the SGID bit for a file sets your group ID to the file&#8217;s group while the file is executing. IT is really useful in case you have a real multi-user setup where users access each others files. As a single homeuser I haven&#8217;t really found a lot of use for SGID. But the basic concept is the same as the SUID, the files whose SGID bit are set would be used as if they belong to that group rather than to that user alone.</p>
<h2>Setting the SUID/SGID bits</h2>
<p><a href="http://www.lifelinux.com/wp-content/uploads/2011/03/sed1.png"><img loading="lazy" class="aligncenter size-medium wp-image-275" title="SUID, SGID and Sticky Bits" src="http://www.lifelinux.com/wp-content/uploads/2011/03/sed1-300x114.png" alt="SUID, SGID and Sticky Bits" width="300" height="114" srcset="http://lifelinux.com/wp-content/uploads/2011/03/sed1-300x114.png 300w, http://lifelinux.com/wp-content/uploads/2011/03/sed1.png 650w" sizes="(max-width: 300px) 100vw, 300px" /></a><br />
<strong>Setting SUID bits on the file:</strong><br />
Suppose I got the executable called &#8220;killprocess&#8221; and I need to set the suid bit on this file, go to command prompt and issue command:</p>
<pre>chmod u+s filename</pre>
<p>Now check permission on the file with command</p>
<pre>ls -l filename</pre>
<p>Observe &#8220;s&#8221; that has been added for suid bit</p>
<pre>-rwsr-xr-x 1 root root 8 Jun  8 10:10 filename</pre>
<p><strong>Setting GUID bits on the file:</strong><br />
Go to command prompt and issue command:</p>
<pre>chmod g+s filename</pre>
<p>This will set the GUID bit on the same file, check the permission on this file using command:</p>
<pre>ls -l filename</pre>
<pre>-rwsr-sr-x 1 root root 8 Jun  8 12:11 filename</pre>
<p><strong>Setting Sticky bits on the folder:</strong></p>
<pre>chmod +t folder</pre>
<h2>Find SUID/SGID files</h2>
<p><strong>Find all SUID root files:</strong></p>
<pre>find / -user root -perm -4000 -print</pre>
<p><strong>Find all SGID root files:</strong></p>
<pre>find / -group root -perm -2000 -print</pre>
<p><strong>Find all SUID and SGID files owned by anyone:</strong></p>
<pre>find / -perm -4000 -o -perm -2000 -print</pre>
<g:plusone href="http://lifelinux.com/suid-sgid-and-sticky-bits/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/suid-sgid-and-sticky-bits/">SUID, SGID and Sticky Bits</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/suid-sgid-and-sticky-bits/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Copy Hidden Files On Linux</title>
		<link>http://lifelinux.com/how-to-copy-hidden-files-on-linux/</link>
					<comments>http://lifelinux.com/how-to-copy-hidden-files-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Tue, 23 Nov 2010 10:29:05 +0000</pubDate>
				<category><![CDATA[Bash Shell]]></category>
		<category><![CDATA[File System]]></category>
		<category><![CDATA[command line tool]]></category>
		<category><![CDATA[copy hidden files on Linux]]></category>
		<category><![CDATA[cp command]]></category>
		<category><![CDATA[dot files]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[rsync command]]></category>
		<category><![CDATA[rsync copy hidden files]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=67</guid>

					<description><![CDATA[<p>Q. Is there an easy way to recursively copy all files include hidden files in a directory to another directory? A. Using rsync command is a better solution. rsync -av --progress /source /destination With: -a: Archive Mode -v: Verbose Mode &#8211;progress: Show progress during transfer. Another solution, you may also use cp command and pattern [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-copy-hidden-files-on-linux/">How To Copy Hidden Files On Linux</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p><strong>Q</strong>. Is there an easy way to recursively copy all files include hidden files in a directory to another directory?</p>
<p><strong>A</strong>. Using rsync command is a better solution.<span id="more-67"></span></p>
<pre>rsync -av --progress /source /destination</pre>
<p><strong>With:</strong></p>
<p>-a: Archive Mode</p>
<p>-v: Verbose Mode</p>
<p>&#8211;progress: Show progress during transfer.</p>
<p>Another solution, you may also use <strong>cp command</strong> and pattern matches, type the following command:</p>
<pre>cp -R ./[^.]* /destination</pre>
<g:plusone href="http://lifelinux.com/how-to-copy-hidden-files-on-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-copy-hidden-files-on-linux/">How To Copy Hidden Files On Linux</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/how-to-copy-hidden-files-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Destroy All Hard Drive Data In Debian</title>
		<link>http://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/</link>
					<comments>http://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 23 Nov 2010 08:24:31 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[delete hdd]]></category>
		<category><![CDATA[destroy all data in hdd]]></category>
		<category><![CDATA[destroy all hard drive]]></category>
		<category><![CDATA[destroy all hdd]]></category>
		<category><![CDATA[killall command]]></category>
		<category><![CDATA[sudo command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=36</guid>

					<description><![CDATA[<p>If you want to delete all data contained in your hard drive so that you render it empty in case you want to sell it or for any other reasons, you need to follow these steps: 1. Turn on your computer and boot from Debian Live CD or any of its variants (Debian, Ubuntu, Xubuntu, [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/">How To Destroy All Hard Drive Data In Debian</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>If you want to delete all data contained in your hard drive so that you  render it empty in case you want to sell it or for any other reasons,  you need to follow these steps:</p>
<p>1. Turn on your computer and boot from <strong>Debian Live CD</strong> or any of its variants (Debian, Ubuntu, Xubuntu, Edubuntu, Ubuntulite, Fluxbuntu, etc.).<span id="more-36"></span><br />
2. In the terminal, run the command given below to disable the swap partition:</p>
<pre>sudo swapoff</pre>
<p><strong>Note:</strong> If you don&#8217;t execute this command, some data might remain on your hard drive.</p>
<p>3. Now you have to run the command listed below to zero out your hard drive:</p>
<pre>sudo dd if=/dev/zero of=/dev/sda</pre>
<p>The formatting process might take a long time to finish, this depends on  the size of your hard disk. To view remaining time, you have to run  this command:</p>
<pre>sudo killall -USR1 dd</pre>
<p>Upon running the command listed above, you will be shown the disk space &#8220;cleaned&#8221; in GB.</p>
<g:plusone href="http://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/">How To Destroy All Hard Drive Data In Debian</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
