<?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>My Scribbles &#187; Linux Command</title>
	<atom:link href="http://www.blazecoder.com/tag/linux-command/feed" rel="self" type="application/rss+xml" />
	<link>http://www.blazecoder.com</link>
	<description></description>
	<lastBuildDate>Thu, 08 Jul 2010 05:15:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing File Permission and Ownership in Linux</title>
		<link>http://www.blazecoder.com/linux-command/changing-file-permission-and-ownership-in-linux</link>
		<comments>http://www.blazecoder.com/linux-command/changing-file-permission-and-ownership-in-linux#comments</comments>
		<pubDate>Wed, 24 Mar 2010 06:58:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Command]]></category>
		<category><![CDATA[basic linux commands]]></category>
		<category><![CDATA[chmod 755]]></category>
		<category><![CDATA[chmod 777]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[How to change file ownership in Linux?]]></category>
		<category><![CDATA[How to change File Permission in Linux?]]></category>

		<guid isPermaLink="false">http://www.blazecoder.com/?p=257</guid>
		<description><![CDATA[Earlier in this chapter I&#8217;ve explained about Basic Linux Commands.  Linux, like Unix is a multi-user system and understanding file permission and ownership is one way that the system protects against malicious praud and unathorized access.
How to change the file permission in Linux?
To change the file or folder permission in Linux you&#8217;ll need to have [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier in this chapter I&#8217;ve explained about <a title="List of Linux Commands" href="http://www.blazecoder.com/linux-command/list-of-linux-commands" target="_blank">Basic Linux Commands</a>.  Linux, like Unix is a multi-user system and understanding file permission and ownership is one way that the system protects against malicious praud and unathorized access.</p>
<p><strong>How to change the file permission in Linux?</strong><br />
To change the file or folder permission in Linux you&#8217;ll need to have better understanding to SSH into your account using PuTTY.  Make sure to have root access and sudo privilages to have the full access of the entire system.<br />
Example:<br />
By typing this Linux Command <strong>ls -al</strong><br />
You will notice  how file being listed and how to interpret it.</p>
<p style="text-align: justify;"><a href="http://www.blazecoder.com/wp-content/uploads/2010/03/How-to-change-File-Permission-and-Ownership-in-Linux.jpg"><img class="aligncenter size-medium wp-image-258" title="How to change File Permission and Ownership in Linux" src="http://www.blazecoder.com/wp-content/uploads/2010/03/How-to-change-File-Permission-and-Ownership-in-Linux-300x13.jpg" alt="How to change File Permission and Ownership in Linux" width="475" height="13" /></a></p>
<table border="1" width="20px;">
<tbody>
<tr>
<td><span style="font-size: xx-small;">d</span></td>
<td><span style="font-size: xx-small;">rwx</span></td>
<td><span style="font-size: xx-small;">rwx</span></td>
<td><span style="font-size: xx-small;">rwx</span></td>
<td><span style="font-size: xx-small;">5</span></td>
<td><span style="font-size: xx-small;">rolan</span></td>
<td><span style="font-size: xx-small;">7055</span></td>
<td><span style="font-size: xx-small;">March 2 2010</span></td>
<td><span style="font-size: xx-small;">html</span></td>
</tr>
<tr>
<td><span style="font-size: xx-small;">directory</span></td>
<td><span style="font-size: xx-small;">read,<br />
write,<br />
execute<br />
by the owner</span></td>
<td><span style="font-size: xx-small;">read,<br />
write,<br />
execute<br />
by group</span></td>
<td><span style="font-size: xx-small;">read,<br />
write,<br />
execute<br />
by everyone</span></td>
<td><span style="font-size: xx-small;">links</span></td>
<td><span style="font-size: xx-small;">owner</span></td>
<td><span style="font-size: xx-small;">file size</span></td>
<td><span style="font-size: xx-small;">date</span></td>
<td><span style="font-size: xx-small;">Directory Name</span></td>
</tr>
</tbody>
</table>
<p>Explanation  for <strong>drwxrwxrwx</strong><br />
- If any of these letters is replaced with a  hyphen (-), it means that permission is not granted for a particular  user or group.</p>
<p>- To change ownership on a whole folder and everything inside it you need to use the recursive argument for the chown command. Note the &#8220;-R&#8221; in the following example.</p>
<p style="text-align: justify;">Syntax: <strong>chown  -R owner:group foldername or filename</strong></p>
<p style="text-align: justify;"><strong></strong>Chown command – Changed the ownership of the file or group.</p>
<p style="text-align: justify;">Type: <strong>Sudo chown -R  rolan:rolan html cake</strong></p>
<p style="text-align: justify;">Note: html and cake were 2 directories.  (-R), Use this syntax to change the      ownership of the file or  directory recursively.</p>
<p style="text-align: justify;"><strong>drwxr-xr-x</strong><br />
= A folder which has read, write and execute permissions for the owner, but only read and execute permissions for the group and for other users.</p>
<p><strong>-rw-rw-rw-</strong><br />
= A file that can be read and written by anyone, but not executed at all.</p>
<p><strong>-rw-r&#8211;r&#8211;</strong><br />
= A file that can be read and written by the user, but only read by the group and everyone else.</p>
<p>777 is the same as rwxrwxrwx<br />
755 is the same as rwxr-xr-x<br />
666 is the same as rw-rw-rw-<br />
744 is the same as rwxr&#8211;r&#8211;</p>
<p>- To change the permission of the file to be writable, and readable by anyone.</p>
<p>Syntax: <strong>chmod Numeric Permission File or Directory</strong></p>
<p>chmod: The chmod command changes the permissions on the files listed.<br />
Type:  <strong>sudo chmod -R 777 html<br />
</strong></p>
<p>Numeric Permissions:<br />
CHMOD can also to attributed by using Numeric Permissions:<br />
400 read by owner<br />
040 read by group<br />
004 read by anybody (other)<br />
200 write by owner<br />
020 write by group<br />
002 write by anybody<br />
100 execute by owner<br />
010 execute by group<br />
001 execute by anybody<br />
040 read by group<br />
004 read by anybody (other)<br />
200 write by owner<br />
020 write by group<br />
002 write by anybody<br />
100 execute by owner<br />
010 execute by group<br />
001 execute by anybody</p>
<p>Hope you&#8217;ll find this helpful. <img src='http://www.blazecoder.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.blazecoder.com/linux-command/changing-file-permission-and-ownership-in-linux/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>List of Linux Commands</title>
		<link>http://www.blazecoder.com/linux-command/list-of-linux-commands</link>
		<comments>http://www.blazecoder.com/linux-command/list-of-linux-commands#comments</comments>
		<pubDate>Thu, 12 Nov 2009 12:33:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Command]]></category>
		<category><![CDATA[create directories linux syntax]]></category>
		<category><![CDATA[Linux command syntax]]></category>
		<category><![CDATA[List of Linux Commands]]></category>
		<category><![CDATA[moving directory using linux command]]></category>
		<category><![CDATA[navigate directory using linux command]]></category>
		<category><![CDATA[Navigating files using linux command]]></category>

		<guid isPermaLink="false">http://www.blazecoder.com/?p=117</guid>
		<description><![CDATA[This topic is the continuation of my previous post. I have explained on How To Use PuTTY SSH Windows. Now, this following Linux Commands probably will help you manage and modify files and permission on your Linux Server.
help command &#8211; Display brief info on a bash (shell) build-in command. Just type &#8220;help&#8221;.
Navigating Files, Folders and [...]]]></description>
			<content:encoded><![CDATA[<p>This topic is the continuation of my previous <a href="http://www.blazecoder.com/linux-command/how-to-use-putty-ssh-in-windows">post</a>. I have explained on <a href="http://www.blazecoder.com/linux-command/how-to-use-putty-ssh-in-windows">How To Use PuTTY SSH Windows</a>. Now, this following Linux Commands probably will help you manage and modify files and permission on your Linux Server.</p>
<p>help command &#8211; Display brief info on a bash (shell) build-in command. Just type &#8220;help&#8221;.</p>
<p><strong>Navigating Files, Folders and Directory using Linux</strong></p>
<table border='1'>
<tr>
<td>command</td>
<td>Description</td>
</tr>
<tr>
<td width='90' align='left'>cd -</td>
<td>The cd command allows you to change directories. When you open a terminal, you will be in your home directory.</td>
</tr>
<tr>
<td width='90' align='left'>cd ~/Desktop</td>
<td>To navigate to your desktop directory.</td>
</tr>
<tr>
<td width='90' align='left'>cd /</td>
<td>To navigate into the root directory.</td>
</tr>
<tr>
<td width='90' align='left'>cd ..</td>
<td>To navigate up one directory level.</td>
</tr>
<tr>
<td width='90' align='left'>cd -</td>
<td>To navigate to the previous directory (or back).</td>
</tr>
<tr>
<td width='90' align='left'>cd /var/www</td>
<td>To navigate through multiple levels of directories at once, use cd /var/www,  for example, which take you directly to the /www subdirectory of /var.</td>
</tr>
<tr>
<td width='90' align='left'>pwd</td>
<td>&#8220;Print Working Directory&#8221;. Shows the full path of the current directory.</td>
</tr>
<tr>
<td width='90' align='left'>ls</td>
<td>Lists all the files in the current directory.</td>
</tr>
<tr>
<td width='90' align='left'>ls -al</td>
<td>Lists all files and information.</td>
</tr>
<tr>
<td width='90' align='left'>ls –alR</td>
<td>Lists all files and information in all sub directories</td>
</tr>
<tr>
<td width='90' align='left'>ls *.html</td>
<td>Lists all files ending with .html</td>
</tr>
<tr>
<td width='90' align='left'>ls -d */</td>
<td> Lists all directories within current directory</td>
</tr>
<tr>
<td width='90' align='left'>cd foo</td>
<td>Changes to a new directory, ex. directory name foo.</td>
</tr>
<tr>
<td width='90' align='left'>clear</td>
<td> Clears the screen</td>
</tr>
<tr>
<td width='90' align='left'>vdir</td>
<td>Gives a more detailed listing than the “ls” command</td>
</tr>
</table>
<p><strong>Creating, Moving Directory and File using Linux Commands</strong></p>
<table border='1'>
<tr>
<td width='209' align='left'>Command</td>
<td>Description</td>
</tr>
<tr>
<td width='202' align='left'>mkdir [directory name]</td>
<td>Creates a new directory</td>
</tr>
<tr>
<td width='202' align='left'>mv [old filename] [new filename]</td>
<td> Move/rename a file
</td>
</tr>
</table>
<p><strong>Deleting files and Directory using Linux Command</strong></p>
<p>rm -r  = (recursive remove) Remove files, directories, and their sub directories. Careful with this command as root&#8211;you can easily remove all files on the system with such a command executed on the top of your directory tree, and there is no undelete in Linux (yet). But if you really wanted to do it (reconsider), here is how (as root): rm -rf /*</p>
<table border='1'>
<tr>
<td>command</td>
<td>Description</td>
</tr>
<tr>
<td width='187' align='left'>rm [filename]</td>
<td>Deletes a file</td>
</tr>
<tr>
<td width='187' align='left'>rm *.html</td>
<td>Deletes all files ending in .html</td>
</tr>
<tr>
<td width='187' align='left'>rm -r filename.php filename.txt</td>
<td>Removes filename.php and filename.txt files</td>
</tr>
</table>
<p></p>
<p><strong>Copy Files and Directory using Linux Command</strong></p>
<p>The cp command is used to copy files and directories. The copies become independent of the originals (i.e., a subsequent change in one will not affect the other). When a copy is made of a file or directory, the copy must have a different name than the original if it is to be placed in the same directory as the original. However, the copy can have the same name if it is made in a different directory. </p>
<p>cp&#8217;s basic syntax:<br />
cp [options] name/filename new_filename </p>
<p>cp -r [directory] [new directory]  =   Copies a directory and all files/directories in it.<br />
ex. cp -r foo /home/rolan/foo  &#8211; this will copy foo directory under rolan&#8217;s directory.</p>
<p>cp [filename] [new filename]  =   to copy file in the same directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blazecoder.com/linux-command/list-of-linux-commands/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Use PuTTY SSH in Windows</title>
		<link>http://www.blazecoder.com/linux-command/how-to-use-putty-ssh-in-windows</link>
		<comments>http://www.blazecoder.com/linux-command/how-to-use-putty-ssh-in-windows#comments</comments>
		<pubDate>Mon, 02 Nov 2009 15:24:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Command]]></category>
		<category><![CDATA[How to use putty SSH Client]]></category>
		<category><![CDATA[putt ssh]]></category>
		<category><![CDATA[putty for windows]]></category>
		<category><![CDATA[Telnet]]></category>

		<guid isPermaLink="false">http://www.blazecoder.com/?p=38</guid>
		<description><![CDATA[It&#8217;s been almost a year now since  I&#8217;m using PuTTY. This is probably one of my favorite tools.
To use Putty, you need to have a basic knowledge in Linux Command. PuTTY allows Windows users to connect to remote systems over the Internet via Telnet and SSH. Both Telnet and SSH allows you to connect [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been almost a year now since  I&#8217;m using PuTTY. This is probably one of my favorite tools.</p>
<p>To use Putty, you need to have a basic knowledge in Linux Command. PuTTY allows Windows users to connect to remote systems over the Internet via Telnet and SSH. Both Telnet and SSH allows you to connect to remote systems. This is very useful applications used to secure file transfers over the Internet and it&#8217;s hard for others to intercept passwords and other private information.</p>
<p><strong>What is PuTTY and how to use it?</strong></p>
<p>PuTTY is a terminal emulator application which can act as a client for the SSH, Telnet, rlogin, and raw TCP computing protocols. The name &#8220;PuTTY&#8221; has no definitive meaning, though &#8216;tty&#8217; is the name for a terminal in the Unix tradition, usually held to be short for teletype.</p>
<p>For Windows and Unix, You can download PuTTY <a href="http://www.putty.org/">here</a>.</p>
<p><strong>How to use PuTTY with SSH?</strong><br />
here is my guide:</p>
<p>1.) Run the putty.exe file<br />
    After you run the PuTTY file this following window will appear on your screen.</p>
<p>  <img src="<a href="http://tinypic.com" target="_blank"><img src="http://i37.tinypic.com/aua5v5.jpg" border="0" alt="How to use PuTTY SSH "></a></p>
<p>    On this example, I used &#8220;www.example.com&#8221; as a Hostname but you can also  input directly the IP Address of the Website to connect remotely.</p>
<p>    On the Saved Sessions, just type any name that you want (Mine is &#8220;Session1&#8243;) and then click save to save the Sessions. The next time you connect to your PuTTY, just input the Hostname/IP Address then click the name of the Save Sessions to continue.</p>
<p>2.) After you input all the correct info, click Open button. The following window will appear. </p>
<p><img src="<a href="http://tinypic.com" target="_blank"><img src="http://i36.tinypic.com/4q6gyd.jpg" border="0" alt="Putty SSH Window"></p>
<p>   This is the basic knowledge on how to use PuTTY SSH Client. You can start now using some of the basic Linux Command which I&#8217;ll be posting here in the coming days, so stay in touch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blazecoder.com/linux-command/how-to-use-putty-ssh-in-windows/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
