<?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>Wowebmaster.com &#187; Linux</title>
	<atom:link href="http://www.wowebmaster.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wowebmaster.com</link>
	<description>World of Webmaster: Sharing Experiences</description>
	<lastBuildDate>Sun, 23 Jan 2011 23:40:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Basic Bash Commands in Linux</title>
		<link>http://www.wowebmaster.com/linux/basic-bash-commands-in-linux/</link>
		<comments>http://www.wowebmaster.com/linux/basic-bash-commands-in-linux/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 11:56:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.wowebmaster.com/?p=8</guid>
		<description><![CDATA[A basic reference to bash commands used in Linux' command line.]]></description>
			<content:encoded><![CDATA[<p>This reference is prepared for webmasters to provide basic knowledge of bash linux commands. You should know these if you are thinking to move to a dedicated server or have already one.</p>
<p><strong>Mkdir &#8211; Make directories</strong>:</p>
<p>* <em>Options</em></p>
<ul>
<li>-m, mode=MODE  set permission mode (as in chmod), not rwxrwxrwx &#8211; umask</li>
<li>-p, parents  no error if existing, make parent directories as needed</li>
<li>-v, verbose  print a message for each created directory</li>
<li>-help display this help and exit</li>
<li>-version output version information and exit</li>
</ul>
<p>* <em>Usage</em><br />
<code>mkdir -m 777 folder1</code></p>
<p>Above code would create a directory named <em>folder1</em> which can be read, executed and written by all kind of users. The first digit represents the owner, the second represents the group and the third represents other users. The number 7 represents all three types of permission ( read, write and execute), 6 stands for read and write only, 5 stands for read and execute, 4 is read only, 3 is write and execute, 2 is write only, 1 is execute only and 0 is no permissions.</p>
<p><strong>Cd &#8211; Change Directories</strong>:</p>
<p>* <em>Usage</em></p>
<p><code>cd folder1</code><br />
The above command would change the current directory to directory named <em>folder1</em>.</p>
<p><code>cd ..</code><br />
The above command would go to parent directory of current directory.</p>
<p><code>cd /</code><br />
The above command would go to root directory regardless which directory you are in.</p>
<p>Mv &#8211; Move or Rename Directories &amp; Files:</p>
<p>* <em>Usage</em></p>
<p><code>move testfolder newfolder</code><br />
This command would move/rename <em>testfolder</em> to <em>newfolder</em>.</p>
<p><code>move * /newdir/</code><br />
The above command moves all files and directories in the current directory, including all the contents of those directories, from the current directory to the directory <em>/newdir/</em> .</p>
<p><strong>Pwd &#8211; Print Working Directory</strong>:<br />
It shows you the full path to the directory you are currently in.</p>
<p>* <em>Usage</em></p>
<p><code>pwd</code><br />
It would print the following line:<br />
<em>/home/server/mywebsite.com/</em></p>
<p><strong>Rm &#8211; Remove Directories</strong>:</p>
<p>* <em>Usage</em></p>
<p><code>rm install</code><br />
<em>Cannot Remove DIRECTORY Is A Directory</em><br />
If you are getting this error, just force it with this command.</p>
<p><code>rm -rf install</code><br />
The above command would remove the whole directory with files and directories in.</p>
<p><strong>Chmod &#8211; Change File Access Permissions</strong></p>
<p>* <em>Options</em><br />
-c, &#8211;changes: like verbose but report only when a change is made<br />
&#8211;no-preserve-root: do not treat `/&#8217; specially (the default)<br />
&#8211;preserve-root: fail to operate recursively on `/&#8217;<br />
-f, &#8211;silent, &#8211;quiet: suppress most error messages<br />
-v, verbose: output a diagnostic for every file processed<br />
&#8211;reference=RFILE: use RFILE&#8217;s mode instead of MODE values<br />
-R, &#8211;recursive: change files and directories recursively<br />
&#8211;help: display this help and exit<br />
&#8211;version: output version information and exit</p>
<p>* <em>Usage</em></p>
<p><code>chmod 644 index.htm</code><br />
The above command gives the file read/write by the owner and only read by everyone else.</p>
<p><em>Some Numerical Mod Presentations</em><br />
600 read and write by owner<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</p>
<p><strong>Ls &#8211; Short Listing of Directories &amp; Files</strong>:</p>
<p>* <em>Options</em><br />
-al: detailed listing of files and directories, showing permissions, ownership, size, and time and date stamp.</p>
<p>Just type <em>ls</em> on the command line, and you get the list of files and directories within your current directory.</p>
<p><strong>Cp &#8211; Copy Files</strong>:</p>
<p>* <em>Options</em><br />
-i: with this option, you will be prompted before overwriting the file.<br />
-dpr: copy preserving links (-d option), file attributes (-p option), and copy recursively (-r option)</p>
<p>* <em>Usage</em></p>
<p><code>cp -dpr folder1 folder2/</code><br />
The above code would copy the directory <em>folder1</em> with its contents, to the directory under <em>folder2</em>.</p>
<p><em>folder2</em> has now:<br />
<em><br />
anotherfile.html<br />
folder1<br />
</em></p>
<p><strong>Tar &amp; Bzip2 &#8211; Archive Compression &amp; Extraction</strong></p>
<p>* <em>Usage</em><br />
<code>tar -c folder/ | bzip2 &gt; folder.tar.bz2</code><br />
The above command compresses <em>folder</em> directory and the following command extracts the compressed archive.</p>
<p><code>bzip2 -dc folder.tar.bz2 | tar -x</code></p>
<p><strong>Gpg &#8211; Encryption &amp; Decryption of Files in Linux</strong></p>
<p>* <em>Usage</em><br />
To encrypt and decrypt files you can use the following command:<br />
<code>gpg -c file</code><br />
<code>gpg file.gpg</code></p>
<p><strong>Wget &#8211; Download Files from Web</strong></p>
<p>* <em>Options</em><br />
-r: downloads the whole directory<br />
-c: continues the previous download<br />
-b: goes to background execution<br />
-p: path to place the downloaded files</p>
<p>* <em>Usage</em><br />
The following command, downloads the whole directory, going to background after starting the download.<br />
<code>wget -r -b http://www.somedomain.com/files/</code></p>
<p><strong>Slocate &#8211; Search &amp; Locate files</strong><br />
This command builds the slocate database. It will take several minutes to complete this command.This command must be used before searching for files, however cron runs this command periodically on most systems.locate whereis Lists all files whose names contain the string &#8220;whereis&#8221;. directory.</p>
<p><strong>Cat &#8211; Contents of Files</strong><br />
Sends file contents to standard output. This is a way to list the contents of short files to the screen.</p>
<p><strong>Whereis</strong><br />
Report all known instances of a command.</p>
<p><strong>Wc</strong><br />
Print byte, word, and line counts</p>
<p><strong>Bg</strong><br />
Places the current job (or, by using the alternative form, the specified jobs) in the background, suspending its execution so that a new user prompt appears immediately. Use the jobs command to discover the identities of background jobs.</p>
<p><strong>Cal &#8211; month year</strong><br />
Prints a calendar for the specified month of the specified year.</p>
<p><strong>Clear</strong><br />
Clears the terminal screen.</p>
<p><strong>Dmesg</strong><br />
Prints the messages resulting from the most recent system boot.</p>
<p><strong>Fg</strong><br />
Brings the current job (or the specified jobs) to the foreground.</p>
<p><strong>File</strong><br />
Determines and prints a description of the type of each specified file.</p>
<p><strong>Free</strong><br />
Displays the amount of used and free system memory.</p>
<p><strong>Ftp</strong><br />
Opens an FTP connection to the specified host, allowing files to be transferred. The FTP program provides subcommands for accomplishing file transfers.</p>
<p>* <em>Usage</em><br />
<code>ftp hostname</code></p>
<p><strong>Head</strong><br />
Prints the first several lines of each specified file.</p>
<p><strong>Kill</strong> process_ids<br />
Kills the specified processes, sends the specified processes the specified signal (given as a number or name), or prints a list of available signals.</p>
<p>* <em>Usage</em><br />
<code>kill - signal process_ids<br />
kill -l<br />
killall program<br />
killall - signal program<br />
</code></p>
<p><strong>Mail</strong><br />
Launches a simple mail client that permits sending and receiving email messages.</p>
<p><strong>Ping host</strong><br />
Sends an echo request via TCP/IP to the specified host. A response confirms that the host is operational.</p>
<p><strong>Reboot</strong><br />
Reboots the system.</p>
<p><strong>Shutdown</strong><br />
Shuts down the system after the specified number of minutes elapses (requires root privileges). The -r option causes the system to be rebooted once it has shut down.</p>
<p><code>shutdown -r minutes</code></p>
<p><strong>Telnet</strong><br />
Opens a login session on the specified host.</p>
<p><code>telnet host</code></p>
<p><strong>Top &#8211; System Resources</strong><br />
Prints a display of system processes that&#8217;s continually updated until the user presses the q key.</p>
<p><strong>Traceroute</strong><br />
Uses echo requests to determine and print a network path to the host.</p>
<p><code>traceroute 1.1.1.1</code></p>
<p><strong>Uptime</strong><br />
Prints the system uptime.</p>
<p><strong>W</strong><br />
Prints the current system users.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?&amp;linkurl=http%3A%2F%2Fwww.wowebmaster.com%2Flinux%2Fbasic-bash-commands-in-linux%2F&amp;linkname=Basic%20Bash%20Commands%20in%20Linux"><img src="http://www.wowebmaster.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.wowebmaster.com/linux/basic-bash-commands-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Htaccess Redirects</title>
		<link>http://www.wowebmaster.com/linux/htaccess-redirects/</link>
		<comments>http://www.wowebmaster.com/linux/htaccess-redirects/#comments</comments>
		<pubDate>Wed, 14 May 2008 15:25:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.wowebmaster.com/blog/?p=5</guid>
		<description><![CDATA[A tutorial on htaccess' redirect methods]]></description>
			<content:encoded><![CDATA[<p>Web site creating is making directories and files connected in someway. If you even have fewer web sites, you probably came across with the situations you wanted to redirect your visitors to someother pages. You might move your domain to a new one, change your file&#8217;s extensions or change your subfolder name.</p>
<p>There are different methods for different kinds of problems. If you are looking for htaccess solutions, here is the methods:</p>
<blockquote><p>If you don&#8217;t have a &#8220;.htaccess&#8221; file (a hidden file) on your server, create one and upload it in ASCII mode</p></blockquote>
<p><strong>Simple Page Redirect:</strong><br />
The following code will redirect your visitors from example.html to example2.html page.</p>
<p><code>Redirect 301 /example.html http://www.domain.com/example2.html</code></p>
<p>301 means you redirected the page permanently. If it is a temporary redirect, remove that 301 from the code.</p>
<p><strong>Simple Folder Redirect:</strong><br />
The following code will redirect all the visitors to another folder.</p>
<p><code>Redirect 301 /shop https://www.domain.com/shop</code></p>
<p><strong>Redirect to Matched Page/Folder:</strong></p>
<p>If you want to redirect your old domain to a new domain with all the files and subfolders, the following code will redirect a visitor (or search engine) to the same file at the new domain.</p>
<p><code>RedirectMatch 301 ^(.*)$ http://www.newdomain.com/</code></p>
<p>Alternatively you can use this:</p>
<p><code>Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] </code></p>
<p>This code will redirect all the visitors from olddomain.com/whatever to newdomain.com/whatever so there will be no need to redirect all the pages individually.</p>
<p><strong>Redirect to New File Extension</strong></p>
<p>If you changed some file extensions and want to redirect your visitors to new extensions, you may want to add the following code to your htaccess:</p>
<p><code>RedirectMatch 301 (.*)\.html$ http://www.example.com$1.php</code></p>
<p>This code will redirect all the html files to php extension pages. Meaning your visitors will be redirected to domain.com/home.php instead of domain.com/home.html.</p>
<p><strong>Redirect Your Whole Root Folder to a SubFolder</strong></p>
<p>Say you have your website under a folder named &#8220;subfolder&#8221;, and you want to access those files from your root folder as well. For example you want to access &#8220;domain.com/subfolder/page.html&#8221; from &#8220;domain.com/page.html&#8221;. The following code will do the trick.</p>
<p><code>RewriteEngine On<br />
Options +FollowSymlinks<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} domain.com<br />
RewriteCond %{REQUEST_URI} !subfolder/<br />
RewriteRule ^(.*)$ subfolder/$1 [L]</code></p>
<p><strong>Redirect www to non www version of site</strong></p>
<p><code>Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} .<br />
RewriteCond %{HTTP_HOST} !^example\.com<br />
RewriteRule (.*) http://example.com/$1 [R=301,L]</code></p>
<p><strong>Redirect non-www to www</strong></p>
<p><code>Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]<br />
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301] </code></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?&amp;linkurl=http%3A%2F%2Fwww.wowebmaster.com%2Flinux%2Fhtaccess-redirects%2F&amp;linkname=Htaccess%20Redirects"><img src="http://www.wowebmaster.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.wowebmaster.com/linux/htaccess-redirects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Password Protected Pages: Htpasswd and Htaccess</title>
		<link>http://www.wowebmaster.com/linux/password-protected-pages-htpasswd-htaccess/</link>
		<comments>http://www.wowebmaster.com/linux/password-protected-pages-htpasswd-htaccess/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 15:50:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[htpasswd]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.wowebmaster.com/blog/?p=1</guid>
		<description><![CDATA[Guide to password protect your folders/pages using htaccess and htpasswd.]]></description>
			<content:encoded><![CDATA[<p>Password protected web pages may have crucial importance for you, if you want to hide some of your pages to public. If you have a configured apache server for this, it&#8217;s so easy to do the rest to add a password and a user to protect a page or folder.</p>
<p>Here how it is done:</p>
<p><strong>1. Configuring your htaccess</strong></p>
<p>If you do not have a .htaccess file on your website&#8217;s directory, create it. But don&#8217;t forget that it is a hidden file, if you are using SSH Secure Shell&#8217;s browser, you have to select &#8220;View&#8221; &gt;&gt; &#8221; Show Hidden Files &#8221; to see whether you have created one, before.</p>
<p>Now, add the following code to your .htaccess file.</p>
<p><code>AuthName "Restricted Area"<br />
AuthType Basic<br />
AuthUserFile /&lt;fullpath&gt;/yourwebsite.com/private-folder/.htpasswd<br />
require valid-user</code></p>
<p>After AuthName field, write a message that will be seen on the authentication screen and don&#8217;t forget to add your fullpath after the AuthUserFile field. It is usually something like this: AuthUserFile /home/.servername/www/yourdomain.com/ .htpasswd</p>
<p><strong>2. Configuring your .htpasswd</strong></p>
<p>.htpasswd is a hidden file that has the encrypted password combinations of your users for authentication. It must be put in a non-public folder, to prevent visitors from viewing this file via a browser. You can put it such as directly above your public HTML folder. Now you understand what it stands for. This htpasswd can be directly created via command line of Linux servers. On the prompt screen of your linux server, type the following command and be sure to run this command above your html folder:</p>
<p><code>htpasswd -cmd .htpasswd &lt;username&gt;</code></p>
<p>You&#8217;ll be prompted to write your desired password. After that, go to yourwebsite.com/private-folder/ to see if everything is ok. You&#8217;ll be asked to login with your username and password.</p>
<p><strong>3. Adding More Users</strong></p>
<p>Adding more users is easy. Just type the following command on the command screen of your server:</p>
<p><code>htpasswd .htaccess </code></p>
<p>Type the desired password and that&#8217;s all.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?&amp;linkurl=http%3A%2F%2Fwww.wowebmaster.com%2Flinux%2Fpassword-protected-pages-htpasswd-htaccess%2F&amp;linkname=Password%20Protected%20Pages%3A%20Htpasswd%20and%20Htaccess"><img src="http://www.wowebmaster.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.wowebmaster.com/linux/password-protected-pages-htpasswd-htaccess/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

