<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4936405915665624582</id><updated>2012-02-18T09:09:55.798+05:30</updated><category term='ruby'/><category term='nohup'/><category term='Linux Scripting Tips'/><category term='simple perl script'/><category term='seq'/><category term='hash'/><category term='env variable'/><category term='SED'/><category term='File and Folder operations'/><category term='shred'/><category term='date'/><category term='nl'/><category term='rpm'/><category term='GNOME'/><category term='awk'/><category term='xset'/><category term='grep'/><category term='cut'/><category term='function'/><category term='Networking'/><category term='bc'/><category term='Apache'/><category term='image'/><category term='TR'/><category term='xmessage'/><category term='crontab'/><category term='if'/><category term='wget'/><category term='Blog Tip'/><category term='SElinux status'/><category term='type'/><category term='vi'/><category term='Find'/><category term='php'/><category term='Dialog'/><category term='Config files'/><category term='User Information'/><category term='ssh'/><category term='size'/><category term='Utilties'/><category term='Sytem Information'/><category term='du'/><category term='split'/><category term='output'/><category term='echo'/><category term='nm command'/><category term='sipX'/><category term='banner commnd'/><category term='Break Password'/><category term='id'/><category term='ls'/><title type='text'>Linux Tips - Tricks</title><subtitle type='html'>http://www.PaisaLive.com/register.asp?2965732-3938426</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default?start-index=101&amp;max-results=100'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>166</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-823960063583427448</id><published>2009-07-08T11:28:00.001+05:30</published><updated>2009-07-08T11:29:58.683+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blog Tip'/><title type='text'>Hide Navigation Bar of the Blog</title><content type='html'>&lt;pre&gt;Add following code in the HTML code where other style code is written,&lt;br /&gt;Use Edit HTML in custmization&lt;br /&gt;&lt;br /&gt;#navbar-iframe {&lt;br /&gt;             height:0px;&lt;br /&gt;             visibility:hidden;&lt;br /&gt;             display:none;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-823960063583427448?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/823960063583427448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/07/hide-navigation-bar-of-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/823960063583427448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/823960063583427448'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/07/hide-navigation-bar-of-blog.html' title='Hide Navigation Bar of the Blog'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-5552118895804784819</id><published>2009-06-26T17:02:00.000+05:30</published><updated>2009-06-26T17:03:23.489+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Break Password'/><title type='text'>Lost User Password</title><content type='html'>$ su&lt;br /&gt;&lt;&gt;&lt;br /&gt;# passwd username&lt;br /&gt;&lt;enter&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-5552118895804784819?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/5552118895804784819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/06/lost-user-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5552118895804784819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5552118895804784819'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/06/lost-user-password.html' title='Lost User Password'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-5083662147411497871</id><published>2009-06-18T14:07:00.000+05:30</published><updated>2009-06-18T14:15:53.023+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='User Information'/><title type='text'>Commands giving user information</title><content type='html'>* w --- tells you who's logged in, and what they're doing. Especially useful: the 'idle' part. This allows you to see whether they're actually sitting there typing away at their keyboards right at the moment.&lt;br /&gt;    * who --- tells you who's logged on, and where they're coming from. Useful if you're looking for someone who's actually physically in the same building as you, or in some other particular location.&lt;br /&gt;    * finger username --- gives you lots of information about that user, e.g. when they last read their mail and whether they're logged in. Often people put other practical information, such as phone numbers and addresses, in a file called .plan. This information is also displayed by 'finger'.&lt;br /&gt;    * last -1 username --- tells you when the user last logged on and off and from where. Without any options, last will give you a list of everyone's logins.&lt;br /&gt;    * talk username --- lets you have a (typed) conversation with another user&lt;br /&gt;    * write username --- lets you exchange one-line messages with another user&lt;br /&gt;    * elm --- lets you send e-mail messages to people around the world (and, of course, read them). It's not the only mailer you can use, but the one we recommend. See the elm page, and find out about the departmental mailing lists (which you can also find in /user/linguistics/helpfile).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-5083662147411497871?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/5083662147411497871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/06/commands-giving-user-information.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5083662147411497871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5083662147411497871'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/06/commands-giving-user-information.html' title='Commands giving user information'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-412181712442301370</id><published>2009-06-11T16:05:00.001+05:30</published><updated>2009-06-11T16:08:13.703+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>Message on the terminal.</title><content type='html'>Mesg X blinking on all your consoles.&lt;br /&gt;Add these in ~/.profile &lt;br /&gt;&lt;br /&gt;mesg X&lt;br /&gt;[ `who -T |grep "$LOGNAME\ *+" |wc -l` -ge 1 ] &amp;&amp; mesg X&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-412181712442301370?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/412181712442301370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/06/message-on-terminal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/412181712442301370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/412181712442301370'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/06/message-on-terminal.html' title='Message on the terminal.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2219944088390047833</id><published>2009-05-28T13:05:00.000+05:30</published><updated>2009-05-28T13:06:31.018+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Linux command similar to history, list last used commands.</title><content type='html'>accton, lastcomm - accouting on and last command. This is &lt;br /&gt;         a way to monitor users on your system. As root, you &lt;br /&gt;         would implement this as follows:&lt;br /&gt;&lt;br /&gt;           $ accton -h&lt;br /&gt;            Usage: accton [-hV] [file]&lt;br /&gt;            [--help] [--version]&lt;br /&gt;&lt;br /&gt;            The system's default process accounting file is /var/account/pacct.&lt;br /&gt;&lt;br /&gt;         Note the default file location is /var/account/pacct so we'll turn&lt;br /&gt;         it on system wide with the following command.&lt;br /&gt;&lt;br /&gt;           $ accton /var/account/pacct&lt;br /&gt;&lt;br /&gt;         Now take a look at this file. It will grow. To see command that&lt;br /&gt;         are executed, use the lastcomm command.&lt;br /&gt;&lt;br /&gt;           $ lastcomm&lt;br /&gt;&lt;br /&gt;         The above command gives output for all users. To get the data&lt;br /&gt;         for user "chirico" execute the following command:&lt;br /&gt;&lt;br /&gt;           $ lastcomm --user chirico&lt;br /&gt;&lt;br /&gt;         You can also get a summary of commands with sa.&lt;br /&gt;&lt;br /&gt;           [chirico@big ~]$ sa&lt;br /&gt;           30       5.23re       0.00cp    10185k&lt;br /&gt;           11       4.83re       0.00cp     8961k   ***other&lt;br /&gt;            8       0.13re       0.00cp    19744k   nagios*&lt;br /&gt;            4       0.00re       0.00cp     2542k   automount*&lt;br /&gt;            3       0.00re       0.00cp      680k   sa&lt;br /&gt;            2       0.13re       0.00cp    17424k   check_ping&lt;br /&gt;            2       0.13re       0.00cp      978k   ping&lt;br /&gt;&lt;br /&gt;         To turn off accounting, execute accton without a filename.&lt;br /&gt;&lt;br /&gt;           $ accton&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2219944088390047833?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2219944088390047833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/linux-command-similar-to-history-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2219944088390047833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2219944088390047833'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/linux-command-similar-to-history-list.html' title='Linux command similar to history, list last used commands.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4963438727220068232</id><published>2009-05-28T12:57:00.001+05:30</published><updated>2009-05-28T12:59:47.298+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Display all system settings or configirations.</title><content type='html'>[root@vikas Desktop]# getconf HOST_NAME_MAX&lt;br /&gt;64&lt;br /&gt;[root@vikas Desktop]# &lt;br /&gt;&lt;br /&gt;Query all system settings with&lt;br /&gt;getconf -a&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4963438727220068232?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4963438727220068232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/display-all-system-settings-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4963438727220068232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4963438727220068232'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/display-all-system-settings-or.html' title='Display all system settings or configirations.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-8896826798746460128</id><published>2009-05-28T12:37:00.001+05:30</published><updated>2009-05-28T12:39:04.046+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='rpm'/><title type='text'>List of rpms with size &amp; name in order</title><content type='html'>rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To view rpm file contents&lt;br /&gt;rpm -qlp file-package.name.rpm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To get info about rpm package itself&lt;br /&gt;rpm -qip file-package.name.rpm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To extract or open rpm file in current directory:&lt;br /&gt;rpm2cpio file.rpm | cpio -idmv&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-8896826798746460128?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/8896826798746460128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/list-of-rpms-with-size-name-in-order.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8896826798746460128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8896826798746460128'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/list-of-rpms-with-size-name-in-order.html' title='List of rpms with size &amp; name in order'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4541768721966865428</id><published>2009-05-28T11:44:00.000+05:30</published><updated>2009-05-28T11:46:29.685+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>How to calculate subnet mask?</title><content type='html'>whatmask - This is a subnet mask notation conversion tool. Or a&lt;br /&gt;     Tool for calculating available host address ranges with CIDR&lt;br /&gt;     notation input.&lt;br /&gt;&lt;br /&gt;[root@vikas Desktop]# whatmask 192.168.4.0/24&lt;br /&gt;&lt;br /&gt;------------------------------------------------&lt;br /&gt;           TCP/IP NETWORK INFORMATION&lt;br /&gt;------------------------------------------------&lt;br /&gt;IP Entered = ..................: 192.168.4.0&lt;br /&gt;CIDR = ........................: /24&lt;br /&gt;Netmask = .....................: 255.255.255.0&lt;br /&gt;Netmask (hex) = ...............: 0xffffff00&lt;br /&gt;Wildcard Bits = ...............: 0.0.0.255&lt;br /&gt;------------------------------------------------&lt;br /&gt;Network Address = .............: 192.168.4.0&lt;br /&gt;Broadcast Address = ...........: 192.168.4.255&lt;br /&gt;Usable IP Addresses = .........: 254&lt;br /&gt;First Usable IP Address = .....: 192.168.4.1&lt;br /&gt;Last Usable IP Address = ......: 192.168.4.254&lt;br /&gt;&lt;br /&gt;[root@vikas Desktop]# &lt;br /&gt;&lt;br /&gt;if whatmask command is not found,&lt;br /&gt;just do &lt;br /&gt;yum install whatmask&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4541768721966865428?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4541768721966865428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/how-to-calculate-subnet-mask.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4541768721966865428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4541768721966865428'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/how-to-calculate-subnet-mask.html' title='How to calculate subnet mask?'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7144714890037938514</id><published>2009-05-28T11:31:00.001+05:30</published><updated>2009-05-28T11:33:08.671+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='seq'/><title type='text'>How to create a sequence?  seq command</title><content type='html'>-f -- format&lt;br /&gt;&lt;br /&gt;[root@vikas ~]#  seq -f "vikas%03g" 5&lt;br /&gt;vikas001&lt;br /&gt;vikas002&lt;br /&gt;vikas003&lt;br /&gt;vikas004&lt;br /&gt;vikas005&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7144714890037938514?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7144714890037938514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/how-to-create-sequence-seq-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7144714890037938514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7144714890037938514'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/how-to-create-sequence-seq-command.html' title='How to create a sequence?  seq command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2800989594281859079</id><published>2009-05-28T11:03:00.002+05:30</published><updated>2009-05-28T11:13:08.612+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='seq'/><title type='text'>Seq commnd. How to print sequence of numbers using linux command?</title><content type='html'>seq - print a sequence of numbers&lt;br /&gt;&lt;br /&gt;$seq 10&lt;br /&gt;$seq -s "+" 10&lt;br /&gt;$seg -s "+" 10 | bc&lt;br /&gt;&lt;br /&gt;e.g &lt;br /&gt;Factorial using linux command&lt;br /&gt;&lt;br /&gt;seq -s "*" 5 | bc&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2800989594281859079?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2800989594281859079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/seq-commnd-how-to-print-sequence-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2800989594281859079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2800989594281859079'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/seq-commnd-how-to-print-sequence-of.html' title='Seq commnd. How to print sequence of numbers using linux command?'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1922694782696363573</id><published>2009-05-27T16:38:00.002+05:30</published><updated>2009-05-27T16:43:28.225+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dialog'/><title type='text'>Input using dialog command or inputing in script using input box</title><content type='html'>Script&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;dialog --title "Input Box" --inputbox "Enter your name" 8 60 2&gt;/tmp/inputTmp.$$&lt;br /&gt;sel=$?&lt;br /&gt;name=`cat /tmp/inputTmp.$$`&lt;br /&gt;&lt;br /&gt;case $sel in&lt;br /&gt;  0) echo "Hello $name" ;;&lt;br /&gt;  1) echo "Cancel Pressed" ;;&lt;br /&gt;  255) echo "ESC key pressed" ;;&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;rm -f /tmp/inputTmp.$$&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1922694782696363573?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1922694782696363573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/input-using-dialog-command-or-inputing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1922694782696363573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1922694782696363573'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/input-using-dialog-command-or-inputing.html' title='Input using dialog command or inputing in script using input box'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2519294392306080931</id><published>2009-05-27T16:34:00.002+05:30</published><updated>2009-05-27T16:37:40.529+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dialog'/><title type='text'>Dialog command example, how to make alerts in script?</title><content type='html'>dialog      display dialog boxes from shell scripts&lt;br /&gt;&lt;br /&gt;e.g&lt;br /&gt;&lt;br /&gt;dialog --title "You Title" --yesno "\nDo you want to do this" 7 40&lt;br /&gt;sel=$?&lt;br /&gt;case $sel in&lt;br /&gt;   0) echo "You Clicked Yes";;&lt;br /&gt;   1) echo "You Clicked No";;&lt;br /&gt;   255) echo "Canceled by user by pressing ESC key";;&lt;br /&gt;esac&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2519294392306080931?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2519294392306080931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/dialog-command-example-how-to-make.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2519294392306080931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2519294392306080931'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/dialog-command-example-how-to-make.html' title='Dialog command example, how to make alerts in script?'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1874450773651394001</id><published>2009-05-12T13:19:00.003+05:30</published><updated>2009-05-12T13:35:18.509+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Some Command Line / Terminal Tips....</title><content type='html'>Key or key combination  Function&lt;br /&gt;                       &lt;br /&gt;Ctrl+A  Move cursor to the beginning of the command line.&lt;br /&gt;&lt;br /&gt;Ctrl+C  End a running program and return the prompt,&lt;br /&gt;                       &lt;br /&gt;Ctrl+D  Log out of the current shell session, equal to typing exit or logout.&lt;br /&gt;                      &lt;br /&gt;Ctrl+E  Move cursor to the end of the command line.&lt;br /&gt;                      &lt;br /&gt;Ctrl+H  Generate backspace character.&lt;br /&gt;                      &lt;br /&gt;Ctrl+L  Clear this terminal.&lt;br /&gt;                     &lt;br /&gt;Ctrl+R  Search command history,&lt;br /&gt;                      &lt;br /&gt;Ctrl+Z  Suspend a program,&lt;br /&gt;&lt;br /&gt;ArrowLeft and ArrowRight ---  Move the cursor one place to the left or right on the command line, so that you can&lt;br /&gt;             insert characters at other places than just at the beginning and the end.&lt;br /&gt;&lt;br /&gt;ArrowUp and  ArrowDown --  Browse history. Go to the line that you want to repeat, edit details if necessary,&lt;br /&gt;               and press Enter to save time.&lt;br /&gt;&lt;br /&gt;Shift+PageUp and  Shift+PageDown ---  Browse terminal buffer (to see text that has "scrolled off" the screen).&lt;br /&gt;                     &lt;br /&gt;&lt;br /&gt;Tab --   Command or filename completion; when multiple choices are possible, the system&lt;br /&gt;                       will either signal with an audio or visual bell, or, if too many choices are possible,&lt;br /&gt;                        ask you if you want to see them all.&lt;br /&gt;                      &lt;br /&gt;Tab Tab --  Shows file or command completion possibilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1874450773651394001?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1874450773651394001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/some-command-line-terminal-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1874450773651394001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1874450773651394001'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/some-command-line-terminal-tips.html' title='Some Command Line / Terminal Tips....'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7977422427263426046</id><published>2009-05-05T10:54:00.001+05:30</published><updated>2009-05-05T10:56:44.759+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Networking'/><title type='text'>IP Address Classes</title><content type='html'>The address class determined the potential size of the network. The class of an address specified which of the bits were used to identify the network, the network ID, or which bits were used to identify the host ID, host computer. It also defined the total number of hosts subnets per network. There were five classes of IP addresses: classes A through E.&lt;br /&gt;Class A: Class A addresses are specified to networks with large number of total hosts. Class A allows for 126 networks by using the first octet for the network ID. The first bit in this octet, is always set and fixed to zero. And next seven bits in the octet is all set to one, which then complete network ID. The 24 bits in the remaining octets represent the hosts ID, allowing 126 networks and approximately 17 million hosts per network. Class A network number values begin at 1 and end at 127.&lt;br /&gt;&lt;br /&gt;Class B: Class B addresses are specified to medium to large sized of networks. Class B allows for 16,384 networks by using the first two octets for the network ID. The two bits in the first octet are always set and fixed to 1 0. The remaining 6 bits, together with the next octet, complete network ID. The 16 bits in the third and fourth octet represent host ID, allowing for approximately 65,000 hosts per network. Class B network number values begin at 128 and end at 191.&lt;br /&gt;&lt;br /&gt;Class C: Class C addresses are used in small local area networks (LANs). Class C allows for approximately 2 million networks by using the first three octets for the network ID. In class C address three bits are always set and fixed to 1 1 0. And in the first three octets 21 bits complete the total network ID. The 8 bits of the last octet represent the host ID allowing for 254 hosts per one network. Class C network number values begin at 192 and end at 223.&lt;br /&gt;&lt;br /&gt;Class D and E: Classes D and E are not allocated to hosts. Class D addresses are used for multicasting, and class E addresses are not available for general use: they are reserved for future purposes.&lt;br /&gt;&lt;br /&gt;Class Leftmost bits  Start address Finish address&lt;br /&gt;A  0xxx  0.0.0.0  127.255.255.255&lt;br /&gt;B  10xx  128.0.0.0  191.255.255.255&lt;br /&gt;C  110x  192.0.0.0  223.255.255.255&lt;br /&gt;D  1110  224.0.0.0  239.255.255.255&lt;br /&gt;E  1111  240.0.0.0  255.255.255.255&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7977422427263426046?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7977422427263426046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/ip-address-classes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7977422427263426046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7977422427263426046'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/ip-address-classes.html' title='IP Address Classes'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3179775702033697782</id><published>2009-05-05T10:52:00.001+05:30</published><updated>2009-05-05T10:53:55.087+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Networking'/><title type='text'>What is 127.0.0.1</title><content type='html'>127.0.0.1 is the standard IP address used for a loop back network connection.&lt;br /&gt;This means that if you try to connect to 127.0.0.1, you are immediately looped back to your own machine.&lt;br /&gt;&lt;br /&gt;If you telnet, ssh, ftp, etc... to 127.0.0.1, you are connected to your own machine.&lt;br /&gt;In other words, 127.0.0.1 is you.&lt;br /&gt;Another name for 127.0.0.1 is localhost.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3179775702033697782?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3179775702033697782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/what-is-127001.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3179775702033697782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3179775702033697782'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/05/what-is-127001.html' title='What is 127.0.0.1'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-700458164023771091</id><published>2009-04-29T12:59:00.002+05:30</published><updated>2009-04-29T13:12:52.986+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Configuring FreeNX Server on linux manchine &amp; accessing it form Windows.</title><content type='html'>Download rpms. 1 links is here &lt;br /&gt;http://www.nomachine.com/download-package.php?Prod_Id=718&lt;br /&gt;&lt;br /&gt;Install all three Server, client, node&lt;br /&gt; rpm -ivh rpmName&lt;br /&gt;&lt;br /&gt;use -- yum install freenx nx &lt;br /&gt;       yum install openssh-server&lt;br /&gt;&lt;br /&gt;User nx commands&lt;br /&gt;      cp  /usr/libexec/nx/nxloadconfig /usr/NX/bin&lt;br /&gt;     /usr/libexec/nx/nxsetup --install --setup-nomachine-key&lt;br /&gt;    /usr/libexec/nx/nxserver --status&lt;br /&gt;                             --restart [--start] &lt;br /&gt;&lt;br /&gt;    /usr/libexec/nx/nxserver --useradd root&lt;br /&gt;    /usr/libexec/nx/nxserver --passwd root&lt;br /&gt;   &lt;br /&gt;     /usr/NX/bin/nxserver --keygen&lt;br /&gt;   &lt;br /&gt;On windows install NX client from EXE&lt;br /&gt;[From Linux]&lt;br /&gt;cat /var/lib/nxserver/home/.ssh/client.id_dsa.key &lt;br /&gt;&lt;br /&gt;Copy the text you get and in your NX client, on your login dialog box go to:&lt;br /&gt;Configure &gt; General Tab &gt; Key&lt;br /&gt;&lt;br /&gt;Configure other things and login.&lt;br /&gt;SSH must be ruuing on linux. Turn off the firewall.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-700458164023771091?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/700458164023771091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/configuring-freenx-server-on-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/700458164023771091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/700458164023771091'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/configuring-freenx-server-on-linux.html' title='Configuring FreeNX Server on linux manchine &amp; accessing it form Windows.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1828777838228483262</id><published>2009-04-24T10:49:00.002+05:30</published><updated>2009-04-24T10:52:29.665+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>How to start and stop Apache</title><content type='html'>[use 'service httpd' ] OR ['apachectl' if installed]&lt;br /&gt;&lt;br /&gt;[Here are some exapmles]&lt;br /&gt;&lt;br /&gt;[root@vikas ~]# service httpd start&lt;br /&gt;Starting httpd:                                            [  OK  ]&lt;br /&gt;[root@vikas ~]# apachectl stop&lt;br /&gt;[root@vikas ~]# service httpd status&lt;br /&gt;httpd dead but subsys locked&lt;br /&gt;[root@vikas ~]# apachectl start&lt;br /&gt;[root@vikas ~]# service httpd status&lt;br /&gt;httpd (pid 3055 3054 3053 3052 3051 3050 3049 3048 3047) is running...&lt;br /&gt;[root@vikas ~]# apachectl stop&lt;br /&gt;[root@vikas ~]# service httpd status&lt;br /&gt;httpd dead but subsys locked&lt;br /&gt;[root@vikas ~]# service httpd status&lt;br /&gt;httpd dead but subsys locked&lt;br /&gt;[root@vikas ~]# service httpd stop&lt;br /&gt;Stopping httpd:                                            [FAILED]&lt;br /&gt;[root@vikas ~]# service httpd status&lt;br /&gt;httpd is stopped&lt;br /&gt;[root@vikas ~]# apachectl start&lt;br /&gt;[root@vikas ~]# service httpd status&lt;br /&gt;httpd (pid 3145 3144 3143 3142 3141 3140 3139 3138 3137) is running...&lt;br /&gt;[root@vikas ~]# apachectl stop&lt;br /&gt;[root@vikas ~]# service httpd status&lt;br /&gt;httpd is stopped&lt;br /&gt;[root@vikas ~]#&lt;br /&gt;&lt;br /&gt;# What does apachectl do? - It sends a SIGUSR1 for a restart, and starts the apache server if it’s not running.&lt;br /&gt;# How do you check for the httpd.conf consistency and any errors in it? - apachectl configtest&lt;br /&gt;&lt;br /&gt;[root@vikas ~]# apachectl configtest&lt;br /&gt;Syntax OK&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1828777838228483262?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1828777838228483262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-start-and-stop-apache.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1828777838228483262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1828777838228483262'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-start-and-stop-apache.html' title='How to start and stop Apache'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-5984330921730251467</id><published>2009-04-23T16:50:00.001+05:30</published><updated>2009-04-23T16:52:07.119+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Find'/><title type='text'>Finding &amp; deleting backup files, log files</title><content type='html'>Deleting *~ .log &lt;br /&gt;find  $PWD \( -name \*~ -or -name \*.o -or -name \*.log -or -name \*\#\) -exec rm -f {} \;&lt;br /&gt;&lt;br /&gt;ZIP&lt;br /&gt;find $PWD \( -name \*.tex -or -name \*README\* -or -name \*readme\* \) -exec gzip -9 {} \;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-5984330921730251467?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/5984330921730251467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/finding-deleting-backup-files-log-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5984330921730251467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5984330921730251467'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/finding-deleting-backup-files-log-files.html' title='Finding &amp; deleting backup files, log files'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2670141819448153445</id><published>2009-04-23T16:45:00.002+05:30</published><updated>2009-05-01T13:28:06.918+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='nm command'/><title type='text'>How to know which binary file contains a particular function</title><content type='html'>[cd to dir where all binaries are]&lt;br /&gt;for i in *&lt;br /&gt; do echo $i;&lt;br /&gt; nm $i  |  grep FUN_NAME ;&lt;br /&gt;done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2670141819448153445?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2670141819448153445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-which-binary-file-contains.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2670141819448153445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2670141819448153445'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-which-binary-file-contains.html' title='How to know which binary file contains a particular function'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6845642149679253340</id><published>2009-04-23T11:57:00.002+05:30</published><updated>2009-04-23T12:08:47.514+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sipX'/><title type='text'>How to make rpms of source code in linux</title><content type='html'>[Here is an example to make rpms of sipx source code (Fedora / CentOS)]&lt;br /&gt;&lt;br /&gt;STEP 1: In .spec file modify 'Release: 013143' link this, a umber from SVN-VERSION file.&lt;br /&gt;&lt;br /&gt;STEP 2: Make tar.gz of your source code. [Here i have sipxconfig-3.10.2/ folder of sipx config code]&lt;br /&gt;        $ tar -cvf sipxconfig-3.10.2.tar.gz sipxconfig-3.10.2/&lt;br /&gt;        Above command will make  sipxconfig-3.10.2.tar.gz file.&lt;br /&gt;&lt;br /&gt;STEP 3: Copy sipxconfig-3.10.2.tar.gz to /usr/src/redhat/SOURCES/&lt;br /&gt;&lt;br /&gt;STEP 4: Run this command from terminal as root&lt;br /&gt;        $ cd sipxconfig-3.10.2/&lt;br /&gt;        $ rpmbuild -ba sipxconfig.spec&lt;br /&gt;&lt;br /&gt;[This will make appropriate rpms of the source code. You can find them at /usr/src/redhat/RPMS/i386/ ]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6845642149679253340?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6845642149679253340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-make-rpms-of-source-code-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6845642149679253340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6845642149679253340'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-make-rpms-of-source-code-in.html' title='How to make rpms of source code in linux'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4963809061790589797</id><published>2009-04-16T15:35:00.002+05:30</published><updated>2009-04-16T15:39:51.785+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Stop being pinging by any host</title><content type='html'>Edit /proc/sys/net/ipv4/icmp_echo_ignore_all&lt;br /&gt;[root@vikas ]# echo "1" &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all&lt;br /&gt;[By doing this no body can ping you]&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;EDIT sysctl.conf&lt;br /&gt;add these lines:&lt;br /&gt;net.ipv4.icmp_echo_ignore_broadcasts=1&lt;br /&gt;net.ipv4.icmp_echo_ignore_all=1&lt;br /&gt;[check]&lt;br /&gt;sysctl -p&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4963809061790589797?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4963809061790589797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/stop-being-pinging-by-any-host.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4963809061790589797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4963809061790589797'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/stop-being-pinging-by-any-host.html' title='Stop being pinging by any host'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-8440038601499423480</id><published>2009-04-16T15:34:00.000+05:30</published><updated>2009-04-16T15:35:42.012+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sytem Information'/><title type='text'>Know about you Linux OS</title><content type='html'>[root@vikas ~]# lsb_release -a&lt;br /&gt;LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch&lt;br /&gt;Distributor ID: Fedora&lt;br /&gt;Description:    Fedora release 8 (Werewolf)&lt;br /&gt;Release:        8&lt;br /&gt;Codename:       Werewolf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-8440038601499423480?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/8440038601499423480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/know-about-you-linux-os.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8440038601499423480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8440038601499423480'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/know-about-you-linux-os.html' title='Know about you Linux OS'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4393309460695523816</id><published>2009-04-16T15:33:00.003+05:30</published><updated>2009-04-16T16:01:49.485+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>How to block all hosts entering through SSH over TCP</title><content type='html'>Add a line in file&lt;br /&gt;# /etc/hosts.deny&lt;br /&gt;sshd: ALL&lt;br /&gt;&lt;br /&gt;OR give IP rather than ALL&lt;br /&gt;&lt;br /&gt;OR to allow&lt;br /&gt;&lt;br /&gt;edit file /etc/hosts.allow  and add line&lt;br /&gt;sshd: ip1, ip2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4393309460695523816?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4393309460695523816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-block-all-hosts-entering-through.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4393309460695523816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4393309460695523816'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/how-to-block-all-hosts-entering-through.html' title='How to block all hosts entering through SSH over TCP'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4484544734951368461</id><published>2009-04-15T13:56:00.002+05:30</published><updated>2009-04-15T13:59:45.725+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='echo'/><title type='text'>clear terminal using echo command</title><content type='html'>[clear the terminal]&lt;br /&gt;echo -e "\033c"&lt;br /&gt;&lt;br /&gt;[move cursor to 1st line]&lt;br /&gt; echo -e "\033[1;5r"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4484544734951368461?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4484544734951368461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/clear-terminal-using-echo-command.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4484544734951368461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4484544734951368461'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/clear-terminal-using-echo-command.html' title='clear terminal using echo command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3083012388610052361</id><published>2009-04-15T11:14:00.003+05:30</published><updated>2009-04-15T11:26:42.186+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Installing PUNJABI, HINDI fonts on centOS</title><content type='html'>Step 1. Download Punjabi or Hindi (.ttf) fonts&lt;br /&gt;For examples - http://tdil.mit.gov.in/download/openfonts.htm&lt;br /&gt;Download HINDI fonts from here - janahindi.zip &lt;br /&gt;Can download from other locations.....&lt;br /&gt;http://www.sikhnet.com/Gurmukhi-Fonts&lt;br /&gt;&lt;br /&gt;Step 2. Extract .ttf file and copy it&lt;br /&gt;in folder /usr/share/fonts/hindifont&lt;br /&gt;If punjabi copy to it -- /usr/share/fonts/punjabifont&lt;br /&gt;&lt;br /&gt;Step 3. Edit xfs config file so that system can find the fonts.&lt;br /&gt; edit file  /etc/X11/fs/config&lt;br /&gt;&lt;br /&gt;Add line, at the end of catalogue  section&lt;br /&gt;/usr/local/share/fonts/hindifont,&lt;br /&gt;/usr/share/fonts/punjabifont,&lt;br /&gt;&lt;br /&gt;Step 4. Set the directory as font container, run these command from terminal&lt;br /&gt;$ cd usr/share/fonts/hindifont&lt;br /&gt;$ ttmkfdir -o fonts.scale&lt;br /&gt;$ mkfontdir&lt;br /&gt;$ fc-cache&lt;br /&gt;&lt;br /&gt;Similarly for Punjabi fonts..&lt;br /&gt;&lt;br /&gt;Step 5. Restart you xfs server to make these changes effective.&lt;br /&gt;$ service xfs restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3083012388610052361?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3083012388610052361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/installing-punjabi-hindi-fonts-on.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3083012388610052361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3083012388610052361'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/installing-punjabi-hindi-fonts-on.html' title='Installing PUNJABI, HINDI fonts on centOS'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-527636367948353053</id><published>2009-04-15T11:09:00.000+05:30</published><updated>2009-04-15T11:14:16.728+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>Chnage every files name to lowercase in current folder</title><content type='html'>for i in * ; do &lt;br /&gt;   [ -f $i ] &amp;&amp; mv -i $i `echo $i | tr ‘[A-Z]‘ ‘[a-z]‘`; &lt;br /&gt;done;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-527636367948353053?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/527636367948353053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/chnage-every-files-name-to-lowercase-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/527636367948353053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/527636367948353053'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/chnage-every-files-name-to-lowercase-in.html' title='Chnage every files name to lowercase in current folder'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-5987768333188003534</id><published>2009-04-13T11:15:00.002+05:30</published><updated>2009-04-14T13:12:28.888+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='File and Folder operations'/><title type='text'>Get file permissions in octat using stat command</title><content type='html'>whatis stat&lt;br /&gt;stat                   - display file or file system status&lt;br /&gt;stat                   - get file status&lt;br /&gt;&lt;br /&gt;$stat -c '%a  %n' *&lt;br /&gt;[root@vikas pic]# stat -c '%a %n' *&lt;br /&gt;644 121670133471emzSU.jpg&lt;br /&gt;644 1.gif&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[other valid options are]&lt;br /&gt;Valid format sequences for file systems:&lt;br /&gt;&lt;br /&gt;  %a   Free blocks available to non-superuser&lt;br /&gt;  %b   Total data blocks in file system&lt;br /&gt;  %c   Total file nodes in file system&lt;br /&gt;  %d   Free file nodes in file system&lt;br /&gt;  %f   Free blocks in file system&lt;br /&gt;  %C - Security context in SELinux&lt;br /&gt;  %i   File System ID in hex&lt;br /&gt;  %l   Maximum length of filenames&lt;br /&gt;  %n   File name&lt;br /&gt;  %s   Block size (for faster transfers)&lt;br /&gt;  %S   Fundamental block size (for block counts)&lt;br /&gt;  %t   Type in hex&lt;br /&gt;  %T   Type in human readable form&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-5987768333188003534?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/5987768333188003534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/get-file-permissions-in-octat-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5987768333188003534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5987768333188003534'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/get-file-permissions-in-octat-using.html' title='Get file permissions in octat using stat command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1179711853616540617</id><published>2009-04-10T11:14:00.004+05:30</published><updated>2009-04-10T11:33:22.135+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vi'/><title type='text'>Set / Reset  a password to vi file.</title><content type='html'>[Set a password]&lt;br /&gt;&lt;br /&gt;$vim -x filename&lt;br /&gt;&lt;br /&gt;[This will prompt you the key]&lt;br /&gt;&lt;br /&gt;[To Change or Delete the password, open file]&lt;br /&gt;&lt;br /&gt;$vim filename&lt;br /&gt;&lt;br /&gt;[Enter password]&lt;br /&gt;[now edit file &amp; type as below]&lt;br /&gt;&lt;br /&gt;:set key=newpassword&lt;br /&gt;&lt;br /&gt;[save using :wq &amp; this will reset the password]&lt;br /&gt;[If you use blank password here this will delete the password]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1179711853616540617?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1179711853616540617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/set-reset-password-to-vi-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1179711853616540617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1179711853616540617'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/set-reset-password-to-vi-file.html' title='Set / Reset  a password to vi file.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1488392466556237532</id><published>2009-04-01T12:24:00.002+05:30</published><updated>2009-04-10T11:35:08.243+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sipX'/><title type='text'>Creating repo of sipX rpms using comps.xml and then writing to dvd</title><content type='html'>1) #CREATE REPO IF RPMS ARE ADDED&lt;br /&gt;#Write the name of rpms in ks.cfg and in comps.xml&lt;br /&gt;&lt;br /&gt;#CREATE REPO IF RPMS ARE CHANGED no need to write in files&lt;br /&gt;#changed dir to inside folder get init int cd folder if cd has all teh material&lt;br /&gt;&lt;br /&gt;   createrepo --baseurl="media://1195929637.060433" -g repodata/comps.xml .&lt;br /&gt;&lt;br /&gt;#media is wriiten .diskinfo   [use media of centos CD]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#if images are changed&lt;br /&gt;&lt;br /&gt; mkcramfs stage2/ stage2.img&lt;br /&gt;&lt;br /&gt;this will create img file. change with th e existing.&lt;br /&gt;&lt;br /&gt;2) changed dir to outside folder  i.e cd is the folder where all the material is.&lt;br /&gt;&lt;br /&gt;   mkisofs -R -J -T -no-emul-boot -boot-load-size 4 -boot-info-table -V "Coralpbx 3.4" -A "Created on 05/03/2009" -P "Coral" -p "Coral" -b isolinux/isolinux.bin -c isolinux/boot.cat -x "lost+found" -o coralpbx.iso cd&lt;br /&gt;&lt;br /&gt;-o path of the iso file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3) To write a dvd / right click on iso file and select on "write to disc"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#images path in the stage dir. Change the required images here.&lt;br /&gt;/root/Desktop/stage2/usr/share/anaconda/pixmaps&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1488392466556237532?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1488392466556237532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/pbx-dvd-create-repo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1488392466556237532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1488392466556237532'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/04/pbx-dvd-create-repo.html' title='Creating repo of sipX rpms using comps.xml and then writing to dvd'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2185759368024746261</id><published>2009-03-31T17:36:00.000+05:30</published><updated>2009-03-31T17:40:53.158+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='GNOME'/><title type='text'>Install GNOME KDE on centOS</title><content type='html'>To install Gnome Desktop type this&lt;br /&gt;yum groupinstall "X Window System" "GNOME Desktop Environment"&lt;br /&gt;&lt;br /&gt;and for KDE Desktop&lt;br /&gt;yum groupinstall "X Window System" "KDE (K Desktop Environment)"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2185759368024746261?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2185759368024746261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/install-gnome-kde-on-centos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2185759368024746261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2185759368024746261'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/install-gnome-kde-on-centos.html' title='Install GNOME KDE on centOS'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-8012002518919923690</id><published>2009-03-31T14:33:00.003+05:30</published><updated>2009-03-31T14:37:07.774+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='id'/><title type='text'>Process ID, User ID</title><content type='html'>[Process ID]&lt;br /&gt;echo $$      &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[User ID]&lt;br /&gt;echo $UID&lt;br /&gt;id &lt;br /&gt;id -nu&lt;br /&gt;id -u&lt;br /&gt;&lt;br /&gt;----------------------------&lt;br /&gt;&lt;br /&gt;echo $_              # Just called /bin/bash to run the script.&lt;br /&gt;&lt;br /&gt;ls &gt;/dev/null        # no output from command.&lt;br /&gt;echo $_              # ls&lt;br /&gt;&lt;br /&gt;ls -al &gt;/dev/null    # no output from command.&lt;br /&gt;echo $_              # -al  (last argument)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$ !!                  # last command&lt;br /&gt;$ ![any char]        #last command with that character&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-8012002518919923690?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/8012002518919923690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/process-id-user-id.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8012002518919923690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8012002518919923690'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/process-id-user-id.html' title='Process ID, User ID'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6043155846208283471</id><published>2009-03-30T16:37:00.001+05:30</published><updated>2009-03-30T16:37:52.710+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmessage'/><title type='text'>pop-up using the linux command</title><content type='html'>xmessage -  display a message or query in a window (X-based /bin/echo)&lt;br /&gt;&lt;br /&gt;xmessage abc&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6043155846208283471?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6043155846208283471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/pop-up-using-linux-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6043155846208283471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6043155846208283471'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/pop-up-using-linux-command.html' title='pop-up using the linux command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3971708518643415526</id><published>2009-03-30T16:28:00.005+05:30</published><updated>2009-03-30T16:33:23.934+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xset'/><title type='text'>How to trun off - on monitor using linux command</title><content type='html'>$xset dpms force off&lt;br /&gt;$xset -dispaly:0 dpms force suspend&lt;br /&gt;$xset -dispaly:0 dpms force off&lt;br /&gt;$xset -dispaly:0 dpms force on&lt;br /&gt;    To control Energy Star (DPMS) features:&lt;br /&gt;        -dpms      Energy Star features off&lt;br /&gt;        +dpms      Energy Star features on&lt;br /&gt;         dpms [standby [suspend [off]]]     &lt;br /&gt;              force standby &lt;br /&gt;              force suspend &lt;br /&gt;              force off &lt;br /&gt;              force on &lt;br /&gt;              (also implicitly enables DPMS features) &lt;br /&gt;              a timeout value of zero disables the mode &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[to on after 1 min.]&lt;br /&gt;$echo "xset -dispaly:0 dpms force on" | at "NOW + 1 minutes"&lt;br /&gt;$echo "xset dpms force on" | at "NOW + 1 minutes"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3971708518643415526?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3971708518643415526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/how-to-trun-off-on-monitor-using-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3971708518643415526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3971708518643415526'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/how-to-trun-off-on-monitor-using-linux.html' title='How to trun off - on monitor using linux command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-843278294165949195</id><published>2009-03-25T10:49:00.002+05:30</published><updated>2009-03-25T10:52:09.049+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='shred'/><title type='text'>shred - linux command to delete file</title><content type='html'>Deletes a file securely by overwriting its contents&lt;br /&gt;   shred -v filename (replace filename with your specific file)&lt;br /&gt;The -v option is useful since it provides extra view of what exactly the shred tool is doing while you wait. On especially BIG files this could take a bit of time. The result is that your file is so thoroughly deleted it is very unlikely to ever be retrieved again. This is especially useful when trying to zap important server related files that may include confidential information like user names or hidden processes.&lt;br /&gt;&lt;br /&gt;[root@vikas Desktop]# whatis shred&lt;br /&gt;shred                (1)  - overwrite a file to hide its contents, and optionally delete it&lt;br /&gt;[root@vikas Desktop]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-843278294165949195?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/843278294165949195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/deletes-file-securely-by-overwriting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/843278294165949195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/843278294165949195'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/deletes-file-securely-by-overwriting.html' title='shred - linux command to delete file'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2860103363591967812</id><published>2009-03-07T17:05:00.003+05:30</published><updated>2009-04-14T13:10:29.666+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sytem Information'/><title type='text'>System Memory used total or by a process</title><content type='html'>VMSTAT&lt;br /&gt;root@vikas ~]# whatis vmstat&lt;br /&gt;vmstat               (8)  - Report virtual memory statistics&lt;br /&gt;[root@vikas ~]# vmstat&lt;br /&gt;procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------&lt;br /&gt; r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st&lt;br /&gt; 0  0 204976  18444   4732 154720    3    5   120    49  178  313  8  2 88  2  0&lt;br /&gt;[root@vikas ~]# vmstat 1 2&lt;br /&gt;procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------&lt;br /&gt; r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st&lt;br /&gt; 0  0 204976  17948   4744 154724    3    5   120    49  178  313  8  2 88  2  0&lt;br /&gt; 0  0 204976  17804   4744 154724    0    0     0     0    4 1050  2  1 97  0  0&lt;br /&gt;&lt;br /&gt;FREE&lt;br /&gt;&lt;br /&gt;[root@vikas ~]# whatis free&lt;br /&gt;free                 (1)  - Display amount of free and used memory in the system&lt;br /&gt;free                 (3p)  - free allocated memory&lt;br /&gt;free [malloc]        (3)  - Allocate and free dynamic memory&lt;br /&gt;&lt;br /&gt; free -m&lt;br /&gt; free -m -s 5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PMAP&lt;br /&gt;[root@vikas ~]# whatis pmap&lt;br /&gt;pmap                 (1)  - report memory map of a process&lt;br /&gt;[root@vikas ~]#pmap pid&lt;br /&gt;&lt;br /&gt;PS &lt;br /&gt;lists all processess.&lt;br /&gt;$ ps aux&lt;br /&gt;&lt;br /&gt;[This will show memory% and process]&lt;br /&gt;ps aux | awk {'print $4  " --"    $11'}&lt;br /&gt;ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr&lt;br /&gt;&lt;br /&gt;TOP&lt;br /&gt;[root@vikas ~]# whatis top&lt;br /&gt;top                  (1)  - display Linux tasks&lt;br /&gt;[root@vikas ~]# top -u root &lt;br /&gt; top -p 25714&lt;br /&gt;top -n 2 -p 25714&lt;br /&gt;top -b&lt;br /&gt;[top 10 processes]&lt;br /&gt;top -d 1 | head -n 17 | tail -n 11&lt;br /&gt;&lt;br /&gt;d-delay p-pid n-iterations u-user&lt;br /&gt;&lt;br /&gt;[root@vikas ~]# top -d 1 -n 1 | grep firefox |awk {'print $11 "\t" $13'}&lt;br /&gt;30.2    firefox-bin&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2860103363591967812?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2860103363591967812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/system-memory-used-total-or-by-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2860103363591967812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2860103363591967812'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/system-memory-used-total-or-by-process.html' title='System Memory used total or by a process'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7413218025783710114</id><published>2009-03-06T17:15:00.000+05:30</published><updated>2009-03-06T17:16:54.149+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='image'/><title type='text'>Making a png of "text" using convert command</title><content type='html'>[root@vikas Desktop]# convert -size 800x400 xc:white -font Times-Roman -pointsize 100 -fill red -annotate +120+150 "Anal Pandey" -fill black -annotate +170 +150  +repage anal.png&lt;br /&gt;[root@vikas Desktop]# convert -size 800x400 xc:white -font Times-Roman -pointsize 100 -fill red -annotate +120+150 "Vikas Sharma" -fill black -annotate +170 +150  +repage vikass.png&lt;br /&gt;[root@vikas Desktop]# convert -list type&lt;br /&gt;Bilevel&lt;br /&gt;ColorSeparation&lt;br /&gt;ColorSeparationMatte&lt;br /&gt;Grayscale&lt;br /&gt;GrayscaleMatte&lt;br /&gt;Optimize&lt;br /&gt;Palette&lt;br /&gt;PaletteBilevelMatte&lt;br /&gt;PaletteMatte&lt;br /&gt;TrueColorMatte&lt;br /&gt;TrueColor&lt;br /&gt;[root@vikas Desktop]# convert -list color&lt;br /&gt;yellow1               rgb(255,255,0)                                X11 &lt;br /&gt;yellow2               rgb(238,238,0)                                X11 &lt;br /&gt;yellow3               rgb(205,205,0)                                X11 &lt;br /&gt;yellow4               rgb(139,139,0)                                X11 &lt;br /&gt;YellowGreen           rgb(154,205,50)                               SVG X11 XPM &lt;br /&gt;[root@vikas Desktop]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7413218025783710114?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7413218025783710114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/making-png-of-text-using-convert.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7413218025783710114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7413218025783710114'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/making-png-of-text-using-convert.html' title='Making a png of &quot;text&quot; using convert command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6020583748571792631</id><published>2009-03-06T16:47:00.001+05:30</published><updated>2009-03-06T16:47:29.283+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='hash'/><title type='text'>Hash command</title><content type='html'>[root@vikas ~]# whatis hash &lt;br /&gt;hash                 (1p)  - remember or report utility locations&lt;br /&gt;hash [builtins]      (1)  - bash built-in commands, see bash(1)&lt;br /&gt;Hash::Util           (3pm)  - A selection of general-utility hash subroutines&lt;br /&gt;[root@vikas ~]# &lt;br /&gt;[root@vikas ~]# hash&lt;br /&gt;hits    command&lt;br /&gt;   1    /bin/egrep&lt;br /&gt;   3    /usr/bin/whatis&lt;br /&gt;   2    /usr/bin/yum&lt;br /&gt;   2    /bin/ls&lt;br /&gt;   2    /usr/bin/clear&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6020583748571792631?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6020583748571792631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/hash-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6020583748571792631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6020583748571792631'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/hash-command.html' title='Hash command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3969640523306613705</id><published>2009-03-06T16:44:00.002+05:30</published><updated>2009-03-06T16:46:16.822+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='function'/><title type='text'>function command in terminal</title><content type='html'>function name [enter]&lt;br /&gt;[then enter all statements with in { } ]&lt;br /&gt;&lt;br /&gt;[then write the function name in terminal for output] &lt;br /&gt;&lt;br /&gt;[root@vikas ~]# function vik&lt;br /&gt;&gt; {&lt;br /&gt;&gt; echo "vik fun"&lt;br /&gt;&gt; }&lt;br /&gt;[root@vikas ~]# vik&lt;br /&gt;vik fun&lt;br /&gt;[root@vikas ~]# vik&lt;br /&gt;vik fun&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3969640523306613705?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3969640523306613705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/function-command-in-terminal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3969640523306613705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3969640523306613705'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/function-command-in-terminal.html' title='function command in terminal'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7293715544537037284</id><published>2009-03-06T11:59:00.002+05:30</published><updated>2009-03-06T12:01:20.719+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='output'/><title type='text'>Script using for</title><content type='html'>#/bin/bash&lt;br /&gt;#  Enter some string as command line argument&lt;br /&gt;star () {&lt;br /&gt;    str="$@"&lt;br /&gt;    len=$((${#str}+4))&lt;br /&gt;    for i in $(seq $len); do echo -n '*'; done;&lt;br /&gt;    echo; echo "* "$str" *";&lt;br /&gt;    for i in $(seq $len); do echo -n '*'; done;&lt;br /&gt;    echo&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;hash_ () {&lt;br /&gt;    str="$@"&lt;br /&gt;    len=$((${#str}+4))&lt;br /&gt;    &lt;br /&gt;    for i in $(seq $len); do echo -n '#'; done;&lt;br /&gt;    echo; echo "# "$str" #";&lt;br /&gt;    for i in $(seq $len); do echo -n '#'; done;&lt;br /&gt;    echo&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if [ $# = 0 ] ; then &lt;br /&gt;star "You dont have entered string."&lt;br /&gt;else&lt;br /&gt;star "$*"&lt;br /&gt;hash_ "$*"&lt;br /&gt;fi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7293715544537037284?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7293715544537037284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/script-using-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7293715544537037284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7293715544537037284'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/script-using-for.html' title='Script using for'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3958507400750782189</id><published>2009-03-05T12:42:00.000+05:30</published><updated>2009-03-05T12:43:29.237+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='if'/><title type='text'>All in linux IF ( conditions )</title><content type='html'>* -b file = True if the file exists and is block special file.&lt;br /&gt;    * -c file = True if the file exists and is character special file.&lt;br /&gt;    * -d file = True if the file exists and is a directory.&lt;br /&gt;    * -e file = True if the file exists.&lt;br /&gt;    * -f file = True if the file exists and is a regular file&lt;br /&gt;    * -g file = True if the file exists and the set-group-id bit is set.&lt;br /&gt;    * -k file = True if the files' "sticky" bit is set.&lt;br /&gt;    * -L file = True if the file exists and is a symbolic link.&lt;br /&gt;    * -p file = True if the file exists and is a named pipe.&lt;br /&gt;    * -r file = True if the file exists and is readable.&lt;br /&gt;    * -s file = True if the file exists and its size is greater than zero.&lt;br /&gt;    * -s file = True if the file exists and is a socket.&lt;br /&gt;    * -t fd = True if the file descriptor is opened on a terminal.&lt;br /&gt;    * -u file = True if the file exists and its set-user-id bit is set.&lt;br /&gt;    * -w file = True if the file exists and is writable.&lt;br /&gt;    * -x file = True if the file exists and is executable.&lt;br /&gt;    * -O file = True if the file exists and is owned by the effective user id.&lt;br /&gt;    * -G file = True if the file exists and is owned by the effective group id.&lt;br /&gt;    * file1 –nt file2 = True if file1 is newer, by modification date, than file2.&lt;br /&gt;    * file1 ot file2 = True if file1 is older than file2.&lt;br /&gt;    * file1 ef file2 = True if file1 and file2 have the same device and inode numbers.&lt;br /&gt;    * -z string = True if the length of the string is 0.&lt;br /&gt;    * -n string = True if the length of the string is non-zero.&lt;br /&gt;    * string1 = string2 = True if the strings are equal.&lt;br /&gt;    * string1 != string2 = True if the strings are not equal.&lt;br /&gt;    * !expr = True if the expr evaluates to false.&lt;br /&gt;    * expr1 –a expr2 = True if both expr1 and expr2 are true.&lt;br /&gt;    * expr1 –o expr2 = True is either expr1 or expr2 is true.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3958507400750782189?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3958507400750782189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/all-in-linux-if-conditions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3958507400750782189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3958507400750782189'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/all-in-linux-if-conditions.html' title='All in linux IF ( conditions )'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4978481337716064098</id><published>2009-03-05T12:39:00.000+05:30</published><updated>2009-03-05T12:40:19.099+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='File and Folder operations'/><title type='text'>linux script to check file or folder is empty or not</title><content type='html'>#!/bin/bash&lt;br /&gt;#&lt;br /&gt;ch=4&lt;br /&gt;while [ $ch != 0 ]&lt;br /&gt;do&lt;br /&gt; clear &lt;br /&gt; echo -en "To check File or Folder is empty or not\n"&lt;br /&gt; echo -en "Enter 1. File\n2. Folder\n0. Exit\n"&lt;br /&gt; echo -en "Enter choice 1, 2 or 0 - "&lt;br /&gt; read ch&lt;br /&gt; case $ch in&lt;br /&gt;      1) echo -en "Enter File name (path) -" ; read fl ;&lt;br /&gt; if [ -f $fl ] ; then &lt;br /&gt;  #[ -z "$(cat $fl)" ] &amp;&amp; echo -en "File is Empty\n" || echo -en "File is not Empty\n" ; &lt;br /&gt;  if [ -z "$(cat $fl)" ] ; then &lt;br /&gt;   echo -en "File is Empty\n" &lt;br /&gt;  else &lt;br /&gt;   echo -en "File is not Empty\n" &lt;br /&gt;  fi ; &lt;br /&gt; else&lt;br /&gt; echo -en "File is not Persent.\n"&lt;br /&gt; fi&lt;br /&gt;  echo "Press a key. . ." ; read ;;       &lt;br /&gt;      2) echo -en "Enter Folder name (path) -" ; read fl &lt;br /&gt; if [ -d $fl ] ; then &lt;br /&gt;  #[ -z "$(ls -A $fl)" ] &amp;&amp; echo -en "Folder is Empty\n" || echo -en "Folder is not Empty\n" ;&lt;br /&gt;           if [ -z "$(ls -A $fl)" ] ; then &lt;br /&gt;   echo -en "Folder is Empty\n" &lt;br /&gt;    else &lt;br /&gt;   echo -en "Folder is not Empty\n" &lt;br /&gt;    fi ;&lt;br /&gt; else&lt;br /&gt; echo -en "Folder is not Persent.\n"&lt;br /&gt; fi  &lt;br /&gt;  echo "Press a key. . ." ; read ;;&lt;br /&gt;      0) exit ;;         &lt;br /&gt;      *) echo "Opps!!! Please select choice 1,2 or 0";&lt;br /&gt;         echo "Press a key. . ." ; read ;;&lt;br /&gt;  esac&lt;br /&gt;done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4978481337716064098?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4978481337716064098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/linux-script-to-check-file-or-folder-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4978481337716064098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4978481337716064098'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/linux-script-to-check-file-or-folder-is.html' title='linux script to check file or folder is empty or not'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6585075921685361255</id><published>2009-03-05T11:50:00.001+05:30</published><updated>2009-03-05T11:51:11.490+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='File and Folder operations'/><title type='text'>list of all empty folders linux command</title><content type='html'>find . -depth -type d -empty&lt;br /&gt;&lt;br /&gt;[will operate delete as well]&lt;br /&gt;find . -depth -type d -empty -exec rmdir {} \;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6585075921685361255?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6585075921685361255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/list-of-all-empty-folders-linux-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6585075921685361255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6585075921685361255'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/list-of-all-empty-folders-linux-command.html' title='list of all empty folders linux command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3208455713528245226</id><published>2009-03-05T11:14:00.001+05:30</published><updated>2009-03-05T11:16:14.427+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='File and Folder operations'/><title type='text'>How to check a file of folder is empty or not linux script...</title><content type='html'>[root@vikas Desktop]# touch v/v1&lt;br /&gt;[root@vikas Desktop]# touch v/v2&lt;br /&gt;[root@vikas Desktop]# [ -z "$(ls -A /root/Desktop/v)" ] &amp;&amp; echo "empty" || echo "not"&lt;br /&gt;not&lt;br /&gt;[root@vikas Desktop]# [ -z "$(cat /root/Desktop/coralPBX.sh)" ] &amp;&amp; echo "empty" || echo "not"&lt;br /&gt;not&lt;br /&gt;[root@vikas Desktop]# [ -z "$(cat /root/Desktop/ss)" ] &amp;&amp; echo "empty" || echo "not"&lt;br /&gt;empty&lt;br /&gt;[root@vikas Desktop]# rm v/v&lt;br /&gt;v1  v2  &lt;br /&gt;[root@vikas Desktop]# rm v/v&lt;br /&gt;v1  v2  &lt;br /&gt;[root@vikas Desktop]# rm v/v*&lt;br /&gt;rm: remove regular empty file `v/v1'? y&lt;br /&gt;rm: remove regular empty file `v/v2'? y&lt;br /&gt;[root@vikas Desktop]# [ -z "$(ls -A /root/Desktop/v)" ] &amp;&amp; echo "empty" || echo "not"&lt;br /&gt;empty&lt;br /&gt;[root@vikas Desktop]# rmdir v&lt;br /&gt;[root@vikas Desktop]# [ -z "$(ls -A /root/Desktop/v)" ] &amp;&amp; echo "empty" || echo "not"&lt;br /&gt;ls: cannot access /root/Desktop/v: No such file or directory&lt;br /&gt;empty&lt;br /&gt;[root@vikas Desktop]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3208455713528245226?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3208455713528245226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/how-to-check-file-of-folder-is-empty-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3208455713528245226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3208455713528245226'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/how-to-check-file-of-folder-is-empty-or.html' title='How to check a file of folder is empty or not linux script...'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-286659369139703147</id><published>2009-03-04T17:50:00.004+05:30</published><updated>2009-04-10T11:36:49.447+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vi'/><title type='text'>A picture defing usage of vi</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_41mPZPhe_yk/Sa5yNkFdxrI/AAAAAAAAAGs/f3pjRLgT1ys/s1600-h/vi-vim-cheat-sheet.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 226px;" src="http://4.bp.blogspot.com/_41mPZPhe_yk/Sa5yNkFdxrI/AAAAAAAAAGs/f3pjRLgT1ys/s320/vi-vim-cheat-sheet.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5309306588066858674" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-286659369139703147?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/286659369139703147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/vi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/286659369139703147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/286659369139703147'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/vi.html' title='A picture defing usage of vi'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_41mPZPhe_yk/Sa5yNkFdxrI/AAAAAAAAAGs/f3pjRLgT1ys/s72-c/vi-vim-cheat-sheet.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1580150629113253332</id><published>2009-03-03T12:03:00.000+05:30</published><updated>2009-03-03T12:04:35.238+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='TR'/><title type='text'>Extracting digits, upper lower letter from a string using TR</title><content type='html'>[root@vikas ~]# echo "Vv1Ii2Kk3Aa4Ss5" | tr -cd '[[:upper:]]\n'&lt;br /&gt;VIKAS&lt;br /&gt;[root@vikas ~]# echo "Vv1Ii2Kk3Aa4Ss5" | tr -cd '[[:lower:]]\n'&lt;br /&gt;vikas&lt;br /&gt;[root@vikas ~]# echo "Vv1Ii2Kk3Aa4Ss5" | tr -cd '[[:digit:]]\n'&lt;br /&gt;12345&lt;br /&gt;[root@vikas ~]# echo "Vv1Ii2Kk 3Aa4Ss5" | tr -cd '[[:blank:]]\n'&lt;br /&gt; &lt;br /&gt;[root@vikas ~]# echo "Vv1Ii2Kk3Aa4Ss$$5" | tr -cd '[[:alpha:]]\n'&lt;br /&gt;VvIiKkAaSs&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1580150629113253332?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1580150629113253332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/extracting-digits-upper-lower-letter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1580150629113253332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1580150629113253332'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/03/extracting-digits-upper-lower-letter.html' title='Extracting digits, upper lower letter from a string using TR'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1028031677160268884</id><published>2009-02-27T11:20:00.001+05:30</published><updated>2009-04-13T15:36:10.488+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='bc'/><title type='text'>Floating point comparison in linux script</title><content type='html'>[root@vikas ~]# echo 8.8 == 8.2 | bc&lt;br /&gt;0&lt;br /&gt;[root@vikas ~]# echo 8.8 == 8.8 | bc&lt;br /&gt;1&lt;br /&gt;[root@vikas ~]# &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@vikas ~]# echo 8 == 2 | bc&lt;br /&gt;0&lt;br /&gt;[root@vikas ~]# echo 8 == 8 | bc&lt;br /&gt;1&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1028031677160268884?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1028031677160268884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/floating-point-comparison-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1028031677160268884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1028031677160268884'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/floating-point-comparison-in-linux.html' title='Floating point comparison in linux script'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2378710356886255303</id><published>2009-02-27T11:08:00.003+05:30</published><updated>2009-04-13T15:32:46.780+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sipX'/><title type='text'>How to use POSTGRESQL from terminal commnds (examples)</title><content type='html'>[All below are commands from terminal using the database SIPXCDR as user postgres (no password here) ]&lt;br /&gt;psql --command "create sequence call_ip_id_seq;" SIPXCDR postgres&lt;br /&gt;psql --command "create table call_ip(id bigint default nextval('call_ip_id_seq'),call_id text,from_url text,from_ip text,to_url text, to_ip text,method text, primary key(call_id,from_url,to_url,id));" SIPXCDR postgres&lt;br /&gt;psql --command "alter table cdrs add column caller text;" SIPXCDR postgres&lt;br /&gt;psql --command "alter table cdrs add column caller_ip text;" SIPXCDR postgres&lt;br /&gt;psql --command "alter table cdrs add column callee text;" SIPXCDR postgres&lt;br /&gt;psql --command "alter table cdrs add column callee_ip text;" SIPXCDR postgres&lt;br /&gt;psql --command "create view view_cdrs_ip as SELECT cdrs.id, cdrs.caller, cdrs.caller_ip, cdrs.callee, cdrs.callee_ip, cdrs.start_time, cdrs.connect_time, cdrs.end_time, cdrs.end_time - cdrs.connect_time AS duration, cdrs.termination, cdrs.failure_status, cdrs.failure_reason, cdrs.call_direction FROM cdrs;" SIPXCDR postgres&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2378710356886255303?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2378710356886255303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/how-to-use-postgresql-from-terminal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2378710356886255303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2378710356886255303'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/how-to-use-postgresql-from-terminal.html' title='How to use POSTGRESQL from terminal commnds (examples)'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3650399946515814533</id><published>2009-02-26T17:06:00.002+05:30</published><updated>2009-04-10T11:41:16.307+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SED'/><title type='text'>Deleting a line from a file using sed</title><content type='html'>[Appending a line say sh /usr/bin/coraldatabase.sh]&lt;br /&gt;[root@vikas Desktop]# echo "sh /usr/bin/coraldatabase.sh" &gt;&gt;' /root/.bashrc&lt;br /&gt;&lt;br /&gt;[Deleting a line sh /usr/bin/coraldatabase.sh]&lt;br /&gt;[root@vikas Desktop]# sed -i '/sh \/usr\/bin\/coraldatabase.sh/d' /root/.bashrc&lt;br /&gt;[root@vikas Desktop]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3650399946515814533?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3650399946515814533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/deleting-line-from-file-using-sed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3650399946515814533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3650399946515814533'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/deleting-line-from-file-using-sed.html' title='Deleting a line from a file using sed'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2674804443428505922</id><published>2009-02-26T11:45:00.001+05:30</published><updated>2009-02-26T11:46:24.646+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='simple perl script'/><title type='text'>A simple perl script variables, array, input, output and Reading a file  in PERL</title><content type='html'>#!/usr/bin/perl&lt;br /&gt;#&lt;br /&gt;#output&lt;br /&gt;print "********************\n";&lt;br /&gt;print "First progarm in perl\n";&lt;br /&gt;print "********************\n";&lt;br /&gt;&lt;br /&gt;#variables&lt;br /&gt;$var = "vikas";&lt;br /&gt;print "\n$var\n";&lt;br /&gt;$a=9;&lt;br /&gt;$c=10;&lt;br /&gt;$z=$a+$c;&lt;br /&gt;print "\n$z\n";&lt;br /&gt;&lt;br /&gt;#array&lt;br /&gt;@nos = (1, 2, 3, 4, 5, 6);&lt;br /&gt;push(@nos, 7);&lt;br /&gt;print "\n@nos\n";&lt;br /&gt;print @nos;&lt;br /&gt;print "\n$nos[5]\n";&lt;br /&gt;&lt;br /&gt;#inserting into array&lt;br /&gt;push(@nos, 7);&lt;br /&gt;print "\n@nos[6]\n";&lt;br /&gt;&lt;br /&gt;#deleting from array&lt;br /&gt;$arr=pop(@nos);&lt;br /&gt;print "\nPoped -- $arr\n";&lt;br /&gt;&lt;br /&gt;# length of array  $#nos+1&lt;br /&gt;$len = @nos;&lt;br /&gt;print "\nlength -- $len and $#nos\n";&lt;br /&gt;#array as string&lt;br /&gt;$str = "@nos";&lt;br /&gt;print "\narray as string -- $str\n";&lt;br /&gt;&lt;br /&gt;#array&lt;br /&gt;($a, $b) = ($c, $d);  # Same as $a=$c; $b=$d;&lt;br /&gt;($a, $b) = @nos;  # $a and $b are the first two&lt;br /&gt;    # items of @nos.&lt;br /&gt;($a, @oth) = @nos; # $a is the first item of @nos&lt;br /&gt;    # @oth is a list of the&lt;br /&gt;    # others.&lt;br /&gt;(@oth, $a) = @nos; # @oth is @nos and&lt;br /&gt;    # $a is undefined.&lt;br /&gt;&lt;br /&gt;#reading from terminal&lt;br /&gt;# total numbers of command line args = $#ARGV + 1&lt;br /&gt;# here is first command lin argument &lt;br /&gt;print "\n $ARGV[0]\n";&lt;br /&gt;print "\n $ARGV[1]\n";&lt;br /&gt;&lt;br /&gt;# reading all arguments using for loop&lt;br /&gt;foreach $args (0 .. $#ARGV) {&lt;br /&gt;   print "$ARGV[$args]\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#input from terminal&lt;br /&gt;print "\nEnter var 1 ";&lt;br /&gt;$s = &lt;STDIN&gt;;&lt;br /&gt;print "\nEnter var 2 ";&lt;br /&gt;$r = &lt;STDIN&gt;;&lt;br /&gt;#trimmming the input&lt;br /&gt;chomp $r;&lt;br /&gt;chomp $s;&lt;br /&gt;#printing the input&lt;br /&gt;print "----$r----$s------\n";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#File handling&lt;br /&gt;&lt;br /&gt;$file = '/root/Desktop/ist.pl';  # Name the file&lt;br /&gt;open(INFO, $file);  # Open the file&lt;br /&gt;@lines = &lt;INFO&gt;;  # Read it into an array&lt;br /&gt;close(INFO);   # Close the file&lt;br /&gt;print @lines;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#printing multiple lines&lt;br /&gt;print &lt;&lt;"END";&lt;br /&gt;#####################&lt;br /&gt;vikas&lt;br /&gt;sharma&lt;br /&gt;coral&lt;br /&gt;&lt;br /&gt;END&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2674804443428505922?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2674804443428505922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/simple-perl-script-variables-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2674804443428505922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2674804443428505922'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/simple-perl-script-variables-array.html' title='A simple perl script variables, array, input, output and Reading a file  in PERL'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1190533530728011392</id><published>2009-02-25T17:34:00.002+05:30</published><updated>2009-04-13T12:42:18.187+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='if'/><title type='text'>AND and OR in IF statement in linux script</title><content type='html'>#var1&lt;br /&gt;abc=0&lt;br /&gt;# $1 is ist argument&lt;br /&gt;echo -en "1st arg $1 and $abc\n"&lt;br /&gt;&lt;br /&gt;# OR of two expr&lt;br /&gt;if [ "$1" = "vikas" -o $abc -eq 1  ] ; then&lt;br /&gt; echo "true"&lt;br /&gt;else&lt;br /&gt; echo "false"&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;# AND of two expr&lt;br /&gt;if [ "$1" = "vikas" -a $abc -eq 1  ] ; then&lt;br /&gt; echo "true"&lt;br /&gt;else&lt;br /&gt; echo "false"&lt;br /&gt;fi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1190533530728011392?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1190533530728011392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/and-and-or-in-if-statement-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1190533530728011392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1190533530728011392'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/and-and-or-in-if-statement-in-linux.html' title='AND and OR in IF statement in linux script'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3146032790326925019</id><published>2009-02-25T16:43:00.003+05:30</published><updated>2009-04-13T12:43:00.543+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='crontab'/><title type='text'>Writing in crontab for scheduling from terminal</title><content type='html'>crontab -l &gt; /tmp/file&lt;br /&gt;echo "12 12 * * * sh /ascript.sh_path" &gt;&gt; /tmp/file&lt;br /&gt;crontab /tmp/file&lt;br /&gt;rm -f /tmp/file&lt;br /&gt;&lt;br /&gt;By this your script is now ready to run according to the time scheduled&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3146032790326925019?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3146032790326925019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/writing-in-crontab-for-scheduling-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3146032790326925019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3146032790326925019'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/writing-in-crontab-for-scheduling-from.html' title='Writing in crontab for scheduling from terminal'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7552206648139826767</id><published>2009-02-24T12:42:00.002+05:30</published><updated>2009-04-14T13:13:30.948+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='env variable'/><title type='text'>Setting, unsetting, using  environmental variable in linux</title><content type='html'>[Setting a env variable]&lt;br /&gt;export VIK=vikas    &lt;br /&gt;echo $USER&lt;br /&gt;&lt;br /&gt;[using]&lt;br /&gt;if [ ! $VIK ] ; then&lt;br /&gt;echo "not defined"&lt;br /&gt;else&lt;br /&gt;echo $VIK&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;[unsetting]&lt;br /&gt;unset VIK&lt;br /&gt;&lt;br /&gt;if [  $VIK ] ; then&lt;br /&gt;echo $VIK&lt;br /&gt;else&lt;br /&gt;echo "not defined"&lt;br /&gt;fi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7552206648139826767?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7552206648139826767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/setting-unsetting-using-environmental.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7552206648139826767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7552206648139826767'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/setting-unsetting-using-environmental.html' title='Setting, unsetting, using  environmental variable in linux'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-37349731988220444</id><published>2009-02-21T12:16:00.001+05:30</published><updated>2009-02-21T12:19:00.140+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SElinux status'/><title type='text'>SElinux status</title><content type='html'>[root@vikas ~]# sestatus &lt;br /&gt;SELinux status:                 disabled&lt;br /&gt;[root@vikas ~]# &lt;br /&gt;&lt;br /&gt;[change status]&lt;br /&gt;    &lt;br /&gt;[root@vikas ~]# vi /etc/selinux/config&lt;br /&gt;Edit config file accordingly&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-37349731988220444?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/37349731988220444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/selinux-status.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/37349731988220444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/37349731988220444'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/selinux-status.html' title='SElinux status'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7947947811424753322</id><published>2009-02-21T11:06:00.003+05:30</published><updated>2009-04-13T15:37:33.873+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>Sub-string of a string</title><content type='html'>[Displaying first five char  here stringh is vikassharma]&lt;br /&gt;[root@vikas java]# echo vikassharma | awk '{print substr($0,1,5)}'&lt;br /&gt;vikas&lt;br /&gt;[root@vikas java]# echo vikassharma | cut -c1-5&lt;br /&gt;vikas&lt;br /&gt;[root@vikas java]# printf "%.5s\n" "vikassharma"&lt;br /&gt;vikas&lt;br /&gt;[root@vikas java]#  echo vikassharma | sed 's/\(.\{5\}\).*/\1/'&lt;br /&gt;vikas&lt;br /&gt;[root@vikas java]# var=vikassharma&lt;br /&gt;[root@vikas java]# printf "%.5s\n" "$var"&lt;br /&gt;vikas&lt;br /&gt;[root@vikas java]# echo "${var%${var#?????}}"&lt;br /&gt;vikas&lt;br /&gt;[root@vikas java]# &lt;br /&gt;&lt;br /&gt;[root@vikas java]# echo vikassharma | cut -c6-&lt;br /&gt;sharma&lt;br /&gt;[root@vikas java]# echo vikassharma | awk '{print substr($0,6)}'&lt;br /&gt;sharma&lt;br /&gt;[root@vikas java]# var=vikassharma&lt;br /&gt;[root@vikas java]# echo ${var:5}&lt;br /&gt;sharma&lt;br /&gt;[root@vikas java]# echo "${var#?????}"&lt;br /&gt;sharma&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7947947811424753322?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7947947811424753322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/sub-string-of-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7947947811424753322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7947947811424753322'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/sub-string-of-string.html' title='Sub-string of a string'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1100147900154628976</id><published>2009-02-21T10:57:00.004+05:30</published><updated>2009-04-13T15:34:51.094+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Find'/><title type='text'>Finding files not containg the pattern</title><content type='html'>[Will list the files that does not contains the word in the current directory]&lt;br /&gt;find . -type f \! -exec grep -q "word" {} \; -print&lt;br /&gt;&lt;br /&gt;find . -type f | while read file&lt;br /&gt;     do&lt;br /&gt;         grep "word" $file &gt; /dev/null&lt;br /&gt;         [ $? -ne 0 ] &amp;&amp; echo $file&lt;br /&gt;    done&lt;br /&gt;&lt;br /&gt;[List of all files in the current dir]&lt;br /&gt;find . -type f&lt;br /&gt;&lt;br /&gt;find . -type f | xargs grep -lv "word"&lt;br /&gt;&lt;br /&gt;[List files containing the word]&lt;br /&gt;find . -type f -exec grep -q "void" {} \; -print&lt;br /&gt;&lt;br /&gt;[List files and all occurrence of word ]&lt;br /&gt;&lt;br /&gt; grep -r "void" .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1100147900154628976?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1100147900154628976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/finding-files-not-containg-pattern.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1100147900154628976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1100147900154628976'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/finding-files-not-containg-pattern.html' title='Finding files not containg the pattern'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7190954378532938725</id><published>2009-02-20T18:03:00.001+05:30</published><updated>2009-04-13T15:35:33.862+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='size'/><title type='text'>Size command -- information about a binary file</title><content type='html'>The size [/path/to/binary] command gives the segment sizes of a binary executable or archive file. This is mainly of use to programmers.&lt;br /&gt;&lt;br /&gt;[root@vikas s_w]# size /root/Desktop/current_task/sharedmem_c/a.out&lt;br /&gt;   text    data     bss     dec     hex filename&lt;br /&gt;   1254     260       8    1522     5f2 /root/Desktop/current_task/sharedmem_c/a.out&lt;br /&gt;[root@vikas s_w]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7190954378532938725?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7190954378532938725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/size-command-info-about-binary-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7190954378532938725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7190954378532938725'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/size-command-info-about-binary-file.html' title='Size command -- information about a binary file'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4542804357539958650</id><published>2009-02-20T17:55:00.000+05:30</published><updated>2009-02-20T17:56:39.069+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='nm command'/><title type='text'>nm command List symbols from binary file</title><content type='html'>[root@vikas sharedmem_c]# whatis nm &lt;br /&gt;nm                   (1)  - list symbols from object files&lt;br /&gt;nm                   (1p)  - write the name list of an object file (DEVELOPMENT)&lt;br /&gt;nm-tool              (1)  - utility to report NetworkManager state&lt;br /&gt;&lt;br /&gt;List symbols in an unstripped compiled binary.&lt;br /&gt;&lt;br /&gt;[root@vikas sharedmem_c]# &lt;br /&gt;[root@vikas sharedmem_c]# nm b.out &lt;br /&gt;08049678 d _DYNAMIC&lt;br /&gt;08049744 d _GLOBAL_OFFSET_TABLE_&lt;br /&gt;080485d8 R _IO_stdin_used&lt;br /&gt;         w _Jv_RegisterClasses&lt;br /&gt;08049668 d __CTOR_END__&lt;br /&gt;08049664 d __CTOR_LIST__&lt;br /&gt;08049670 D __DTOR_END__&lt;br /&gt;0804966c d __DTOR_LIST__&lt;br /&gt;08048660 r __FRAME_END__&lt;br /&gt;08049674 d __JCR_END__&lt;br /&gt;08049674 d __JCR_LIST__&lt;br /&gt;0804976c A __bss_start&lt;br /&gt;08049768 D __data_start&lt;br /&gt;08048590 t __do_global_ctors_aux&lt;br /&gt;080483d0 t __do_global_dtors_aux&lt;br /&gt;080485dc R __dso_handle&lt;br /&gt;         w __gmon_start__&lt;br /&gt;08048589 T __i686.get_pc_thunk.bx&lt;br /&gt;08049664 d __init_array_end&lt;br /&gt;08049664 d __init_array_start&lt;br /&gt;08048510 T __libc_csu_fini&lt;br /&gt;08048520 T __libc_csu_init&lt;br /&gt;         U __libc_start_main@@GLIBC_2.0&lt;br /&gt;0804976c A _edata&lt;br /&gt;08049774 A _end&lt;br /&gt;080485b8 T _fini&lt;br /&gt;080485d4 R _fp_hw&lt;br /&gt;080482f8 T _init&lt;br /&gt;08048380 T _start&lt;br /&gt;080483a4 t call_gmon_start&lt;br /&gt;08049770 b completed.5645&lt;br /&gt;08049768 W data_start&lt;br /&gt;0804976c b dtor_idx.5647&lt;br /&gt;08048430 t frame_dummy&lt;br /&gt;08048454 T main&lt;br /&gt;         U perror@@GLIBC_2.0&lt;br /&gt;         U putchar@@GLIBC_2.0&lt;br /&gt;         U shmat@@GLIBC_2.0&lt;br /&gt;         U shmget@@GLIBC_2.0&lt;br /&gt;[root@vikas sharedmem_c]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4542804357539958650?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4542804357539958650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/nm-command-list-symbols-from-binary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4542804357539958650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4542804357539958650'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/nm-command-list-symbols-from-binary.html' title='nm command List symbols from binary file'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7033051152131569144</id><published>2009-02-20T17:00:00.001+05:30</published><updated>2009-04-13T12:45:41.087+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='File and Folder operations'/><title type='text'>Changes all filenames in currnet dir to lowercase</title><content type='html'>#!/bin/bash&lt;br /&gt;for filename in * ; do&lt;br /&gt;   filen=`basename $filename`&lt;br /&gt;   n=`echo $filen | tr A-Z a-z` # tr a-z A-Z   lowercase to upper &lt;br /&gt;   if [ "$filen" != "$n" ]     &lt;br /&gt;   then&lt;br /&gt;     mv $filen $n&lt;br /&gt;     echo "File $filen renamed as $n" &lt;br /&gt;   fi  &lt;br /&gt;done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7033051152131569144?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7033051152131569144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/changes-all-filenames-in-currnet-dir-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7033051152131569144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7033051152131569144'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/changes-all-filenames-in-currnet-dir-to.html' title='Changes all filenames in currnet dir to lowercase'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2197170991882688292</id><published>2009-02-20T16:48:00.003+05:30</published><updated>2009-04-13T15:38:49.707+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='TR'/><title type='text'>A weak but useful encryption using TR</title><content type='html'>[encrypt]&lt;br /&gt;echo "vikas6@" | tr 'a-zA-Z0-9@_' 'j-za-iJ-ZA-I5-90-4*@' &lt;br /&gt;&lt;br /&gt;[decrypt   just reverse]&lt;br /&gt;echo "ertjb1*" | tr  'j-za-iJ-ZA-I5-90-4*@' 'a-zA-Z0-9@_'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2197170991882688292?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2197170991882688292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/weak-but-useful-encryption.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2197170991882688292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2197170991882688292'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/weak-but-useful-encryption.html' title='A weak but useful encryption using TR'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3544357985611320424</id><published>2009-02-20T16:41:00.002+05:30</published><updated>2009-04-14T16:48:17.262+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='type'/><title type='text'>Type command -- tell you about other command</title><content type='html'>whatis type&lt;br /&gt;type                 (1p)  - write a description of command type&lt;br /&gt;type [builtins]      (1)  - bash built-in commands, see bash(1)&lt;br /&gt;[root@vikas 18-feb]# type ls&lt;br /&gt;ls is aliased to `ls --color=tty'&lt;br /&gt;[root@vikas 18-feb]# type dir&lt;br /&gt;dir is /usr/bin/dir&lt;br /&gt;[root@vikas 18-feb]# type banner&lt;br /&gt;banner is /usr/bin/banner&lt;br /&gt;[root@vikas 18-feb]# type rm&lt;br /&gt;rm is aliased to `rm -i'&lt;br /&gt;[root@vikas 18-feb]# type rmdir&lt;br /&gt;rmdir is /bin/rmdir&lt;br /&gt;[root@vikas 18-feb]# type [&lt;br /&gt;[ is a shell builtin&lt;br /&gt;&lt;br /&gt;type -a ls&lt;br /&gt;&lt;br /&gt;It works some what like which, but bash builtin.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3544357985611320424?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3544357985611320424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/type-command-tell-you-about-other.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3544357985611320424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3544357985611320424'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/type-command-tell-you-about-other.html' title='Type command -- tell you about other command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-8989318850929279820</id><published>2009-02-20T16:23:00.003+05:30</published><updated>2009-04-14T13:06:39.288+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sytem Information'/><title type='text'>User list currenly logged in.</title><content type='html'>[root@vikas 18-feb]# whatis users&lt;br /&gt;users                (1)  - print the user names of users currently logged in to the current host&lt;br /&gt;[root@vikas 18-feb]# users &lt;br /&gt;root root root root root&lt;br /&gt;&lt;br /&gt;[root@vikas 18-feb]# who &lt;br /&gt;root     tty7         2009-02-20 10:01 (:0)&lt;br /&gt;root     pts/0        2009-02-20 10:38 (:0.0)&lt;br /&gt;root     pts/1        2009-02-20 16:20 (:0.0)&lt;br /&gt;root     pts/3        2009-02-20 15:46 (192.168.4.141)&lt;br /&gt;root     pts/4        2009-02-20 15:51 (192.168.4.141)&lt;br /&gt;[root@vikas 18-feb]# who -q&lt;br /&gt;root root root root root&lt;br /&gt;# users=5&lt;br /&gt;[root@vikas 18-feb]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-8989318850929279820?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/8989318850929279820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/user-list-currenly-logged-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8989318850929279820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8989318850929279820'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/user-list-currenly-logged-in.html' title='User list currenly logged in.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7124843318718654038</id><published>2009-02-20T16:20:00.002+05:30</published><updated>2009-04-14T13:08:48.848+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Instaling  RPM  by extracting it. If does not installled using rpm -i</title><content type='html'>whatis rpm2cpio &lt;br /&gt;rpm2cpio             (8)  - Extract cpio archive from RPM Package Manager (RPM) package&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;whatis cpio &lt;br /&gt;cpio                 (1)  - copy files to and from archives&lt;br /&gt;cpio.h [cpio]        (0p)  - cpio archive values&lt;br /&gt;cpio                (rpm) - A GNU archiving program.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;e.g&lt;br /&gt;&lt;br /&gt;rpm2cpio banner-1.3.1-5.fc8.i386.rpm | cpio -idmv&lt;br /&gt;&lt;br /&gt;cd usr/bin/&lt;br /&gt;&lt;br /&gt;./banner&lt;br /&gt;&lt;br /&gt;This will exract files from rpm and copy to the required place. As above eg. copy the banner binary to /usr/bin&lt;br /&gt;&lt;br /&gt; -d, --make-directories     Create leading directories where needed&lt;br /&gt; -i, --extract              Extract files from an archive (run in copy-in&lt;br /&gt;                             mode)&lt;br /&gt; -m, --preserve-modification-time&lt;br /&gt;                             Retain previous file modification times when&lt;br /&gt;                             creating files&lt;br /&gt; -v, --verbose              Verbosely list the files processed&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7124843318718654038?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7124843318718654038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/instaling-rpm-by-extracting-it-if-does.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7124843318718654038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7124843318718654038'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/instaling-rpm-by-extracting-it-if-does.html' title='Instaling  RPM  by extracting it. If does not installled using rpm -i'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-819710714211426234</id><published>2009-02-20T12:18:00.003+05:30</published><updated>2009-04-14T13:14:20.716+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='id'/><title type='text'>How to know user identity.</title><content type='html'>id&lt;br /&gt;id                   (1p)  - return user identity&lt;br /&gt;id                   (1)  - print user identity&lt;br /&gt;&lt;br /&gt;root id is 0&lt;br /&gt;id -u return 0 then u r root else not.&lt;br /&gt;&lt;br /&gt;e.g&lt;br /&gt;[root@vikas 18-feb]# id -u&lt;br /&gt;0&lt;br /&gt;[root@vikas 18-feb]# id &lt;br /&gt;uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)&lt;br /&gt;[root@vikas 18-feb]# su vikas&lt;br /&gt;[vikas@vikas 18-feb]$ id&lt;br /&gt;uid=500(vikas) gid=500(vikas) groups=500(vikas)&lt;br /&gt;[vikas@vikas 18-feb]$ id -u&lt;br /&gt;500&lt;br /&gt;[vikas@vikas 18-feb]$ su&lt;br /&gt;&lt;br /&gt;if [ `id -u` = "0" ] ; then&lt;br /&gt;echo "u r root"&lt;br /&gt;else &lt;br /&gt;echo " u r not root"&lt;br /&gt;fi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-819710714211426234?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/819710714211426234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/how-to-know-user-identity.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/819710714211426234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/819710714211426234'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/how-to-know-user-identity.html' title='How to know user identity.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7077814870423039601</id><published>2009-02-19T20:01:00.002+05:30</published><updated>2009-04-14T13:01:08.265+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Config files'/><title type='text'>Message prompts on when somebody logins using ssh  /etc/motd</title><content type='html'>edit /etc/motd&lt;br /&gt;&lt;br /&gt;Whatever you write in this file, displays when somebody, logins using ssh in your system.&lt;br /&gt;&lt;br /&gt;e.g&lt;br /&gt;&lt;br /&gt;[root@localhost ~]# ssh 192.168.4.13&lt;br /&gt;root@192.168.4.13's password: &lt;br /&gt;Last login: Wed Feb 18 17:44:44 2009 from 192.168.4.141&lt;br /&gt;                         *****************************************&lt;br /&gt;                        *                                       *&lt;br /&gt;                       *           Vikas Sharma                *                 &lt;br /&gt;                      *                                       * &lt;br /&gt;                     *****************************************&lt;br /&gt;&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7077814870423039601?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7077814870423039601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/message-prompts-on-when-somebody-logins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7077814870423039601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7077814870423039601'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/message-prompts-on-when-somebody-logins.html' title='Message prompts on when somebody logins using ssh  /etc/motd'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7721415598904143496</id><published>2009-02-19T19:59:00.000+05:30</published><updated>2009-02-19T20:00:24.675+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='banner commnd'/><title type='text'>Banner command</title><content type='html'>banner&lt;br /&gt;&lt;br /&gt;banner [option] [characters]&lt;br /&gt;&lt;br /&gt;Print characters as a poster. If no characters are supplied, banner prompts for them and reads an input line from standard input. By default, the results go to standard output, but they are intended to be sent to a printer.&lt;br /&gt;Option&lt;br /&gt;-w width&lt;br /&gt;&lt;br /&gt;    Set width to width characters. Note that if your banner is in all lowercase, it will be narrower than width characters. If -w is not specified, the default width is 132. If -w is specified but width is not provided, the default is 80.&lt;br /&gt;&lt;br /&gt;e.g&lt;br /&gt;&lt;br /&gt;[root@vikas 18-feb]# banner  vikas&lt;br /&gt;&lt;br /&gt;#     #  ###  #    #     #      #####   &lt;br /&gt;#     #   #   #   #     # #    #     #  &lt;br /&gt;#     #   #   #  #     #   #   #        &lt;br /&gt;#     #   #   ###     #     #   #####   &lt;br /&gt; #   #    #   #  #    #######        #  &lt;br /&gt;  # #     #   #   #   #     #  #     #  &lt;br /&gt;   #     ###  #    #  #     #   #####   &lt;br /&gt;&lt;br /&gt;[root@vikas 18-feb]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7721415598904143496?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7721415598904143496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/banner-command.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7721415598904143496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7721415598904143496'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/banner-command.html' title='Banner command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3554513692413614715</id><published>2009-02-19T18:59:00.003+05:30</published><updated>2009-04-14T16:48:44.916+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>How to make pdf of the manual page of commands</title><content type='html'>[show manual page of the command]&lt;br /&gt;man commnd&lt;br /&gt;&lt;br /&gt;[man page to pdf  (nice way)]&lt;br /&gt;man -t command | ps2pdf - &gt; command.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3554513692413614715?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3554513692413614715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/how-to-make-pdf-of-manual-page-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3554513692413614715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3554513692413614715'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/how-to-make-pdf-of-manual-page-of.html' title='How to make pdf of the manual page of commands'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1814648259638783707</id><published>2009-02-19T15:00:00.003+05:30</published><updated>2009-04-14T16:41:59.764+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>lsof utility</title><content type='html'>whatis lsof&lt;br /&gt;lsof                 (8)  - list open files&lt;br /&gt;lsof                (rpm) - A utility which lists open files on a Linux/UNIX system&lt;br /&gt;&lt;br /&gt;lsof &lt;br /&gt;lsof | grep TCP&lt;br /&gt;lsof -i TCP&lt;br /&gt;lsof | grep 'root' | awk '{print $NF}' | sort | uniq | wc -l&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1814648259638783707?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1814648259638783707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/lsof-utility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1814648259638783707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1814648259638783707'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/lsof-utility.html' title='lsof utility'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2043335357216681893</id><published>2009-02-19T14:50:00.002+05:30</published><updated>2009-02-20T17:59:46.351+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='nohup'/><title type='text'>nohup  - countine a job or command even after logoff</title><content type='html'>whatis nohup&lt;br /&gt;nohup                (1p)  - invoke a utility immune to hangups&lt;br /&gt;nohup                (1)  - run a command immune to hangups, with output to a non-tty&lt;br /&gt;&lt;br /&gt;nohup&lt;br /&gt;&lt;br /&gt;    Keeps a command running even after user logs off. The command will run as a foreground process unless followed by &amp;. If you use nohup within a script, consider coupling it with a wait to avoid creating an orphan or zombie process. &lt;br /&gt;&lt;br /&gt;nohup command args&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2043335357216681893?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2043335357216681893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/nohup-countine-job-or-command-even.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2043335357216681893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2043335357216681893'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/nohup-countine-job-or-command-even.html' title='nohup  - countine a job or command even after logoff'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4720869631209148812</id><published>2009-02-18T19:07:00.003+05:30</published><updated>2009-04-14T13:09:18.698+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>Error redirecting /dev/null</title><content type='html'>/dev/null or the null device is a special file that discards all data written to it.&lt;br /&gt;/dev/null, which is a place you can dump anything you don’t want (often called the bit-bucket),&lt;br /&gt;&lt;br /&gt;commaned &gt; /dev/null 2&gt;&amp;1   or  /dev/null 2&gt;/dev/null&lt;br /&gt;&lt;br /&gt;The greater-thans (&gt;) in commands like these redirect the program’s output somewhere. In this case, something is being redirected into /dev/null, and something is being redirected into &amp;1.&lt;br /&gt;&lt;br /&gt;There are three standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT, and STDERR.&lt;br /&gt;&lt;br /&gt;Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one explicitly, you’re talking about STDOUT.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4720869631209148812?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4720869631209148812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/error-redirecting-devnull.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4720869631209148812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4720869631209148812'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/error-redirecting-devnull.html' title='Error redirecting /dev/null'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3939261427860668032</id><published>2009-02-18T15:24:00.004+05:30</published><updated>2010-02-04T12:14:42.170+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sipX'/><title type='text'>Steps to make sipx installation cd with centos (command line)</title><content type='html'>&lt;meta content="text/html; charset=utf-8" equiv="CONTENT-TYPE"&gt;&lt;/meta&gt;&lt;title&gt;&lt;/title&gt;&lt;meta content="OpenOffice.org 2.3  (Linux)" name="GENERATOR"&gt;&lt;/meta&gt; 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 		H3 { margin-bottom: 0.08in } 		H3.western { font-family: "Liberation Serif", "Times New Roman", serif } 		H3.cjk { font-family: "DejaVu LGC Sans", "Times New Roman" } 		H3.ctl { font-family: "DejaVu LGC Sans", "Times New Roman" } 		H4 { margin-bottom: 0.04in } 		H4.western { font-family: "Times New Roman", serif; font-size: 14pt } 		H4.cjk { font-family: "DejaVu Sans"; font-size: 14pt } 		H4.ctl { font-family: "DejaVu Sans"; font-size: 14pt } 	--&gt; 	&lt;/style&gt;  &lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;This document is about how to create a single boot CD installation for sipX. It is based on CentOS and we are using the kickstart technology included with CentOS and Fedora to script the Anaconda installer. In addition to creating an automated install, this document also describes how to create a custom distribution of CentOS that includes only the needed RPMs including the sipX RPMs and all necessary dependencies. The distribution fits on one CD and is self-contained resolving all its dependencies. No network connection is required to install it.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=vikas01-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B0015T963C&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;h3 align="justify" class="western"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;span style="font-size: 100%;"&gt;2.	Installing Necessary Tools&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;The scripts required to perform all the necessary operations are part of the CentOS / Fedora distribution.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;yum 	install anaconda-runtime createrepo yum-utils anaconda anaconda-help 	busybox-anaconda mkisofs&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;yum 	install system-config-kickstart&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="2"&gt;&lt;ol&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;Create a Working 		Copy of the CentOS Installation Disk&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;We are using CentOS 4 to start with. Only CD 1 is required as we are interested in a customized minimal installation. Mount the CD and copy its content to a working directory:&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;mkdir 	centos-cd1 cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;sudo 	mount /dev/cdrom centos-cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;rsync 	-a centos-cd1/* cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cp 	centos-cd1/.discinfo cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;sudo 	umount centos-cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in; margin-left: 0.12in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=vikas01-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B002WYJFFS&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;ol start="2"&gt;&lt;ol start="2"&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;Create a 		Kickstart Configuration File - ks.cfg&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;The most important file is the kickstart configuration file (ks.cfg). This file has to be copied to the root directory of the new CD. It provides all the parameters to Anaconda for an automated installation, determines what packages to install and allows some post installation scripts to be executed.&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;Save as File: ks.cfg&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;####################################################&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;### Kickstart configuration file&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;### for sipXecs distribution CDs&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;###&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;##################################################&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Installation method (install, no upgrade) and source (CD-ROM)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;install&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;cdrom&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Debugging (uncomment next line to debug in the interactive mode)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#interactive&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Language and input support&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;lang en_US.UTF-8&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;langsupport --default=en_US.UTF-8 en_US.UTF-8&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;keyboard us&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;mouse generic3ps/2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- X-Windows (use "skipx" directive to skip X-Windows configuration)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;skipx&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Network configuration&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# Add some default or else Anaconda will pop a window and ask&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;network --device eth0 --bootproto static --ip 192.168.5.176 --netmask 255.255.255.0 --gateway 192.168.5.1 --nameserver 192.168.5.145 --hostname sipx.example.com&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Authentication and security&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;rootpw setup&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;firewall --disabled&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;selinux --disabled&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;authconfig --enableshadow --enablemd5&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Time zone&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;timezone America/New_York&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Boot loader&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;bootloader --location=mbr&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Partitioning&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# The user will be prompeted to perform this step&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Reboot the host after installation is done&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;reboot&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Package selection&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;%packages --resolvedeps&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;e2fsprogs&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;grub&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;kernel&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;ntp&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;dhcp&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;bind&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;caching-nameserver&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;gdb&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;strace&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# Used for SF build&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxpbx&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxconfig&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxacd&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxconfig-agent&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxconfig-report&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxvxml&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxproxy&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxregistry&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxpublisher&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxproxy-cdr&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxconfig-tftp&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxconfig-ftp&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sipxtools&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#--- Post-installation script&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;%post&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#!/bin/sh&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#...Mount the installation CD&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;/sbin/start_udev&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;/sbin/chkconfig --del smartd &amp;amp;&amp;gt; /dev/null&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;mkdir /tempdir&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;mount /dev/cdrom /tempdir&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#...Setup initial setup script to run one time (after initial reboot only)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;echo -e "\n/usr/bin/sipx_reset_cd\n" &amp;gt;&amp;gt; /root/.bashrc&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# the script removes itself from the root .bashrc file when it completes&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#...Place a copy of the RAID restore script in /sbin&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;cp /tempdir/restore-raid-drive /sbin/restore-raid-drive&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;chmod u=rwx /sbin/restore-raid-drive&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#... Add logon message&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;echo -e "\nWelcome to Coral IPPBX\n" &amp;gt;&amp;gt; /etc/issue&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;echo -e   "=============================\n" &amp;gt;&amp;gt; /etc/issue&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;echo -e "\nFirst time logon: user = root     password = setup\n\n" &amp;gt;&amp;gt; /etc/issue&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#... Boot kernel in quiet mode&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;sed -i 's/ro root/ro quiet root/g' /boot/grub/grub.conf&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# Install SIPfoundry sipX repository and key&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;rpm --import /tempdir/RPM-GPG-KEY-sipX&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;cp /tempdir/sipx-fc.repo /etc/yum.repos.d&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#...Install new splash image&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;cp /tempdir/splash.xpm.gz /boot/grub&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#... Prevent it from being overwritten when upgrading the system using yum update&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;chmod 444 /boot/grub/splash.xpm.gz&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;#...Prevent sipxpbx from starting after first reboot as it is not yet configured&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;chkconfig sipxpbx off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# Postgresql will be started by sipxpbx&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;chkconfig postgresql off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# Turn off unused services that listen on ports&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;chkconfig portmap off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;chkconfig netfs off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;chkconfig nfslock off&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;# Make a backup copy of the CD if there is a /recovery partition&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;if test -d "/recovery" ; then&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;	mkdir /recovery/linux&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;	cp -a /tempdir/* /recovery/linux&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;	cp -a /tempdir/.discinfo /recovery/linux&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;umount /tempdir&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;rm -rf /tempdir&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;eject&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt; Make sure to use the i586 kernel. Also, the process cpu speed needs to be stopped and disabled (/sbin/service cpuspeed stop &amp;amp; chkconfig cpuspeed off). Otherwise the VIA C3 system will crash anytime cpuspeed tries to throttle the CPU back.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;2.3	Creating a Custom Installer&lt;/span&gt;&lt;/h4&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Next we want to create a custom installer including our own splash screen and boot options. The file isolinux.cfg tells the grub bootloader where to look for the kernel. It should be familiar to you as it is identical to the common grub/grub.conf file.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;b&gt;File: cd1/isolinux/isolinux.cfg&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;default coraltele&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;prompt 1&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;timeout 0&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;display boot.msg&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;F1 boot.msg&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;F2 options.msg&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;F3 general.msg&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;F4 param.msg&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;F5 rescue.msg&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;F7 snake.msg&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;label linux&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;kernel vmlinuz&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;append initrd=initrd.img ramdisk_size=8192&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;label memtest86&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;kernel memtest&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;append -&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;label coraltele&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;kernel vmlinuz&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;append initrd=initrd.img ramdisk_size=8192 ks=cdrom:/ks.cfg quiet&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;The file isolinux.cfg specifies that the splash screen to be displayed before starting the boot process is called boot.msg:&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;b&gt;File: cd1/isolinux/boot.msg&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;^L&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;^Xsplash.lss&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Press &lt;enter&gt; to start the installation.&lt;/enter&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;WARNING: All data will be erased and the disk is formatted.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;-----------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Root password is "coraltele".&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;^O02[F1-Main] [F2-Options] [F3-General] [F4-Kernel]^O07&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt; Adapt the other files options.mgs, general.msg, param.msg to your liking.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;2.4	Changing the splash.lss File&lt;/span&gt;&lt;/h4&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;The &lt;span style="font-size: 85%;"&gt;&lt;b&gt;cd1/isolinux/&lt;/b&gt;&lt;/span&gt;splash.lss file is the splash file that displays in the very first screen after the machine restarts and presents the user with the boot options. This file is in the directory /isolinux. An excellent description of how to do this is given below:&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;First Step: &lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Create an image file of the format 640 x 220 pixels using The Gimp. Downsample the color depth to 14 colors. This is done in GIMP by going to -&amp;gt;Image-&amp;gt;Mode - select "indexed". Then save the file in the PPM format in RAW mode.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;Second Step:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt; The created .PPM file needs to be edited. Using an editor open the file and remove the 2nd line where it says that GIMP created this file. The next step does not handle comments in PPM files.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;Third Step:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt; Using ppmtolss16 convert the file to .lss&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;./ppmtolss16 '#c0cfc0=7' &lt;image.ppm&gt;splash.lss&lt;/image.ppm&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;Fourth Step: &lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Copy the file splash.lss to the /isolinux directory.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Changing the Splash Image displayed by Grub (splash.xpm.gz)&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Start the &lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;b&gt;GIMP.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Click 	on File-&amp;gt;New or type Ctrl+N&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;In 	the new image dialog, change Width to 640 pixels and Height to 480 	pixels. (The image should be of size 640x480 pixels.) Now click OK.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Create 	the image which you would like to be the splash image. It's quite 	fun to experiment with the various tools of the GIMP!&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;After 	you have finished creating the image, hit Alt+i or right click on 	the image and click on Image-&amp;gt;Mode-&amp;gt;Indexed...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;In 	the Indexed Color Conversion dialog that appears, click on the radio 	button "Generate optimal Palette" and in "# of 	colors" enter 14. Click OK.(The image should be of only 14 	colors)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Now 	right-click on the image and click on File-&amp;gt;Save As...Save the 	file as splash.xpm in a directory of your choice.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Now 	open a terminal window and navigate to the directory where you have 	saved splash.xpm&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Now 	key in gzip splash.xpm&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;You 	will find that a file named splash.xpm.gz is created in the 	directory where splash.xpm used to exist.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Copy 	this splash.xpm.gz to the /boot/grub directory. You may want to back 	up the pre-existing splash.xpm.gz file in the /boot/grub directory 	first.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=vikas01-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B0019EHU8G&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;ol start="2"&gt;&lt;ol start="5"&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;Customizing 		Anaconda&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Anaconda is the program that provides all the installation services and displays all the graphics during the installation process. It is included in the directory cd1/CentOS/base in a file called stage2.img. An excellent explanation of how to edit this image manually can be found below:&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;The following describes a crude way of changing the artwork used by Anadonca during the installation process. They cleaner way would be to use buildinstall to create a new installer. In this case we start with an existing installer and modify it.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;The image of the Anaconda installer can be found in cd1/CentOS/base. The image file is called stage2.img. We will now mount this image so that we can look inside.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;mkdir 	~/anaconda&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;mount 	-o loop cd1/CentOS/base/stage2.img ~/anaconda&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Now we need to copy the contents to a directory where we can alter the files. A simple cp command was claimed to not work because of some hard links included in the image. For this reason we use tar to package the contents of the directory and then untarred them where we could work on them. &lt;/span&gt; &lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	~/anaconda&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;tar 	-cvf ~/stage2.tar .&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	~&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;mkdir 	stage2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	stage2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;tar 	-xvf ../stage2.tar &lt;/span&gt; 	&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Now we can alter the images used by the installer located in usr/share/anaconda/pixmaps and the images used in the installation slideshow in usr/share/anaconda/pixmaps/rnotes. You can also edit the text in the left sidebar, which is in HTML format, in usr/share/anaconda/help/[locale]. &lt;/span&gt; &lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;After you've made the desired modifications, we need to compress this information back into an .img file. &lt;/span&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	~&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;mkcramfs 	stage2/ stage2.img.new &lt;/span&gt; 	&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Then, copy the altered stage2.img to the CentOS/base directory.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cp 	stage2.img.new cd1/CentOS/base/stage2.img&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 align="justify" class="western"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;span style="font-size: 100%;"&gt;3.	Choose the appropriate RPMs to be in CentOS/RPMS&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;It involves selecting a set if RPMS that comprise all the necessary elements for Linux to install and boot. In addition it requires all the RPMS required for a sipX system. In addition, all the dependencies have to be resolved. And lastly, its size must not exceed what can fit onto a single CD. &lt;/span&gt; &lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;We started with the first CD of the CentOs 4 distribution. The list of RPMs we deleted is long.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;In addition, it is possible to update the RPMs to their latest patch level which makes it unnecessary to run yum update after the system is installed.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;3.1	Test if all dependencies for all the RPMs in CentOS/RPMS are resolved&lt;/span&gt;&lt;/h4&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;The following test is absolutely crucial. Inevitably once you start removing or adding RPMs to the repository, you will have to make sure that all dependencies are resolved properly. Once the test below passes, you have succeeded to create a self-contained repository that will install properly.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	~&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;mkdir 	testdb&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;rpm 	--initdb --dbpath $PWD/testdb&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;rpm 	--test --dbpath $PWD/testdb -Uvh cd1/CentOS/RPMS/*.rpm&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="3"&gt;&lt;ol start="2"&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;Create repodata 		using createrepo&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;createrepo 	--baseurl="media://1142383043.889895" -g 	CentOS/base/comps.xml CentOS/RPMS/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt; Make sure the number in --baseurl corresponds to the first line in the file cd1/.discinfo. Should you have trouble with this command try using absolute path names.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=vikas01-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B002Q1O3FE&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;3.3	Create hdlist and hdlist2&lt;/span&gt;&lt;/h4&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;export 	PYTHONPATH=/usr/lib/anaconda&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;export 	PATH="$PATH:/usr/lib/anaconda-runtime"&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in; margin-left: 0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in; margin-left: 0.25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in; margin-left: 0.25in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;# Write CentOS/base/hdlist and hdlist2:&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;genhdlist 	--hdlist /home/test/cd1/CentOS/base/hdlist --productpath CentOS 	/home/test/cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman,serif;"&gt; Absolute path names are required for the command genhdlist to work properly.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 align="justify" class="western"&gt;&lt;span style="font-size: 100%;"&gt;3.4	Create a Package Order File&lt;/span&gt;&lt;/h4&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;The package order determines the order by which RPMs are installed by Anaconda. This order matters as RPMs only install if all the required dependencies are already installed on the system. The command pkgorder in a recursive process calculates the correct package order.&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	cd1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;pkgorder 	/home/test/cd1 i386 CentOS &amp;gt; /home/test/cd1/pkgorder.txt&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;Run genhdlist again, this time with package order. Now that we have the proper package order calculated we can create the final hdlist files for Anaconda to use: &lt;/span&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;genhdlist 	--withnumbers --fileorder /home/test/cd1/pkgorder.txt \&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;--hdlist /home/test/cd1/CentOS/base/hdlist --productpath CentOS /home/test/cd1&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=vikas01-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B000VH1AZQ&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;h3 align="justify" class="western"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;&lt;span style="font-size: 100%;"&gt;4.	Create the ISO Image&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;cd 	~&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;mkisofs 	-R -J -T -no-emul-boot -boot-load-size 4 -boot-info-table -V "sipX 	3.4" \&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;-A "Created on 8/6/2006" -P "SIPfoundry" -p "SIPfoundry" -b isolinux/isolinux.bin \&lt;/span&gt;&lt;/div&gt;&lt;div align="justify" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Times New Roman,serif;"&gt;-c isolinux/boot.cat -x "lost+found" -o sipx.iso cd1&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3939261427860668032?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3939261427860668032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/steps-to-make-sipx-installation-cd-with.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3939261427860668032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3939261427860668032'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/steps-to-make-sipx-installation-cd-with.html' title='Steps to make sipx installation cd with centos (command line)'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2384800569018034638</id><published>2009-02-18T11:26:00.001+05:30</published><updated>2009-04-13T15:33:43.132+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SED'/><title type='text'>Insert, append and replace lines or text with SED</title><content type='html'>A file vik&lt;br /&gt;&lt;br /&gt;sed '/keyword/ a\your-text-here' vik    #insert your-text-here after every occurance of keyword    &lt;br /&gt;sed '5 a\your-text-here' vik        #insert your-text-here at line 6  &lt;br /&gt;sed '5 i\your-text-here' vik           #insert your-text-here at line 5&lt;br /&gt;sed '/^keyword/ i\your-text-here' vik       #insert your-text-here before keyword&lt;br /&gt;sed '/^keyword/ c\your-text' vik       #replace your keyword with your-text&lt;br /&gt;sed '4 i\text1\ntext2' vik  # this will insert two lines&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2384800569018034638?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2384800569018034638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/insert-append-and-replace-lines-or-text.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2384800569018034638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2384800569018034638'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/insert-append-and-replace-lines-or-text.html' title='Insert, append and replace lines or text with SED'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-157914998994355480</id><published>2009-02-17T16:52:00.009+05:30</published><updated>2009-04-13T15:38:18.707+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>Linux scripting</title><content type='html'>&lt;pre style="color: rgb(0, 0, 0); font-family: arial;"&gt;[Dont use]&lt;br /&gt;for f in `cat file`; do&lt;br /&gt;..&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;[use]&lt;br /&gt;while read f; do&lt;br /&gt;...&lt;br /&gt;done file&lt;br /&gt;&lt;br /&gt;[dont use]&lt;br /&gt;grep | wc -l&lt;br /&gt;&lt;br /&gt;[use]&lt;br /&gt;grep -c &lt;options,1,&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Dont use]&lt;/options,1,&gt;&lt;br /&gt;for f in `echo * or ls *`; do&lt;br /&gt;command "$f"&lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;pre style="color: rgb(0, 0, 0); font-family: arial;"&gt;[use]&lt;br /&gt;for f in * ; do&lt;br /&gt;command "$f"&lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;options,1,&gt;&lt;br /&gt;&lt;br /&gt;&lt;/options,1,&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-157914998994355480?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/157914998994355480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/good-points.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/157914998994355480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/157914998994355480'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/good-points.html' title='Linux scripting'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7045739879271487150</id><published>2009-02-17T16:31:00.001+05:30</published><updated>2009-04-13T15:58:03.802+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ls'/><title type='text'>colorful ls</title><content type='html'>ls -C . --color=always | grep -C 100 --color=auto avi&lt;br /&gt;ls -h . --color=always | grep -C 100 --color=auto avi&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7045739879271487150?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7045739879271487150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/colorful-ls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7045739879271487150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7045739879271487150'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/colorful-ls.html' title='colorful ls'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7361570450344434948</id><published>2009-02-17T16:13:00.003+05:30</published><updated>2009-04-13T12:46:57.979+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='File and Folder operations'/><title type='text'>Getting name of the current dir - using 'basename'</title><content type='html'>[root@vikas vikas]# pwd&lt;br /&gt;/root/Desktop/vikas/vikas&lt;br /&gt;[root@vikas vikas]# basename `pwd`&lt;br /&gt;vikas&lt;br /&gt;[root@vikas vikas]# basename `echo $PWD`&lt;br /&gt;vikas&lt;br /&gt;[root@vikas vikas]# echo ${PWD##*/}&lt;br /&gt;vikas&lt;br /&gt;[root@vikas vikas]#&lt;br /&gt;&lt;br /&gt;[Will display on current dir name i.e path3 here]&lt;br /&gt;basename /path/path2/path3&lt;br /&gt;&lt;br /&gt;[with sed]&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;pwd | sed 's,^\(.*/\)\?\([^/]*\),\2,'&lt;br /&gt;&lt;br /&gt;[with reversing the string]&lt;br /&gt;[root@vikas vikas]# pwd&lt;br /&gt;/root/Desktop/vikas/vikas&lt;br /&gt;[root@vikas vikas]# pwd | rev&lt;br /&gt;sakiv/sakiv/potkseD/toor/&lt;br /&gt;[root@vikas vikas]# pwd | rev | awk -F \/ {'print $1'} &lt;br /&gt;sakiv&lt;br /&gt;[root@vikas vikas]# pwd | rev | cut -f1 -d"/"&lt;br /&gt;sakiv&lt;br /&gt;[root@vikas vikas]# pwd | rev | awk -F \/ {'print $1'} | rev&lt;br /&gt;vikas&lt;br /&gt;[root@vikas vikas]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7361570450344434948?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7361570450344434948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/getting-name-of-current-dir-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7361570450344434948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7361570450344434948'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/getting-name-of-current-dir-using.html' title='Getting name of the current dir - using &apos;basename&apos;'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6152220436674206977</id><published>2009-02-17T14:49:00.003+05:30</published><updated>2009-04-13T16:12:07.451+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='grep'/><title type='text'>Extracting IP's from output of who command using grep</title><content type='html'>[root@vikas ~]# who&lt;br /&gt;root     tty7         2009-02-17 11:23 (:0)&lt;br /&gt;root     pts/0        2009-02-17 12:30 (:0.0)&lt;br /&gt;root     pts/1        2009-02-17 12:32 (:0.0)&lt;br /&gt;root     pts/2        2009-02-17 12:32 (:0.0)&lt;br /&gt;root     pts/3        2009-02-17 13:33 (192.168.4.35)&lt;br /&gt;root     pts/4        2009-02-17 14:23 (192.168.4.15)&lt;br /&gt;&lt;br /&gt;who | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'&lt;br /&gt;who | grep -o '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*'&lt;br /&gt;&lt;br /&gt;192.168.4.35&lt;br /&gt;192.168.4.15&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6152220436674206977?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6152220436674206977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/extracting-ip-from-output.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6152220436674206977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6152220436674206977'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/extracting-ip-from-output.html' title='Extracting IP&apos;s from output of who command using grep'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-8894821186107603080</id><published>2009-02-13T16:08:00.002+05:30</published><updated>2009-04-14T16:46:59.312+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>Command to find PID</title><content type='html'>[root@vikas ~]# pidof httpd&lt;br /&gt;6926 6925 6924 6923 6922 3974&lt;br /&gt;&lt;br /&gt;[root@vikas ~]# pidof vikas&lt;br /&gt;&lt;br /&gt;[root@vikas ~]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-8894821186107603080?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/8894821186107603080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/command-to-find-pid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8894821186107603080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8894821186107603080'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/command-to-find-pid.html' title='Command to find PID'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6747973897683662146</id><published>2009-02-13T12:31:00.003+05:30</published><updated>2009-04-14T16:50:20.888+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>files transfer using ncftp</title><content type='html'>ncftp -u &lt;user&gt; -p &lt;pass&gt; &lt;ip&gt;&lt;br /&gt;&lt;br /&gt;use get, put&lt;br /&gt;&lt;br /&gt;[get file from the /home/vik form 13 machine and place in current dir]&lt;br /&gt;ncftpget -u vik -p 123654 192.168.4.13 . file&lt;br /&gt;ncftpget -u vik -p 123654 192.168.4.13 /root/Desktop file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ncftpput -u vik -p 123654 192.168.4.13 /home/vik file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------------&lt;br /&gt;In FTP&lt;br /&gt;get, put  -- for a single file &lt;br /&gt;mget *, mput * --- for all files in current folder&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6747973897683662146?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6747973897683662146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/files-transfer-using-ncftp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6747973897683662146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6747973897683662146'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/files-transfer-using-ncftp.html' title='files transfer using ncftp'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7212754981786779968</id><published>2009-02-13T12:12:00.006+05:30</published><updated>2009-04-14T13:05:36.122+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilties'/><title type='text'>zimbra mail exchange mails synchronization using imapsync command</title><content type='html'>[File id has all users,   password must be same replace &lt;pass1&gt;&lt;pass2&gt; otherwise write then into file and script accordingly]&lt;br /&gt;&lt;br /&gt;for i in `cat id`&lt;br /&gt;do&lt;br /&gt;echo $i&lt;br /&gt;#zimbra command to create a user with password 123456&lt;br /&gt;#./zmprov ca $i@host.com&lt;br /&gt;&lt;br /&gt;imapsync --buffersize 8192000 --nosyncacls --subscribe --syncinternaldates --host1 hostip&lt;mail&gt;1 --user1 $i --password1 &lt;pass1&gt; --host2 &lt;mail&gt;hostip2 --user2 $i --password2 &lt;pass2&gt; --authmech1 PLAIN --authmech2 LOGIN&lt;br /&gt;&lt;br /&gt;echo "----------------------------"&lt;br /&gt;done&lt;/pass2&gt;&lt;/mail&gt;&lt;/pass1&gt;&lt;/mail&gt;&lt;/pass2&gt;&lt;/pass1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7212754981786779968?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7212754981786779968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/zimbra-mail-exchange-mails.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7212754981786779968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7212754981786779968'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/zimbra-mail-exchange-mails.html' title='zimbra mail exchange mails synchronization using imapsync command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3783899208498460918</id><published>2009-02-13T11:34:00.003+05:30</published><updated>2009-04-14T12:19:35.179+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>Array in linux scripts</title><content type='html'>#array=(a b c d e f)&lt;br /&gt;array=(`ls`)&lt;br /&gt;#total elements&lt;br /&gt;len=${#array[*]}&lt;br /&gt;echo "The array has $len elements."&lt;br /&gt;#array starts from 0&lt;br /&gt;i=0&lt;br /&gt;echo -e "Array is :-"&lt;br /&gt;while [ $i -lt $len ]; do&lt;br /&gt;  echo "$i: ${array[$i]}"&lt;br /&gt;  let i++&lt;br /&gt;done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3783899208498460918?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3783899208498460918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/array-in-linux-scripts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3783899208498460918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3783899208498460918'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/array-in-linux-scripts.html' title='Array in linux scripts'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-235870038595292183</id><published>2009-02-13T11:33:00.002+05:30</published><updated>2009-04-14T16:50:57.476+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>substring in linux script</title><content type='html'>str="this is a vikas test"&lt;br /&gt;substr=${str:10:5}  #from 10th to next 5&lt;br /&gt;echo $substr&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-235870038595292183?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/235870038595292183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/substring-in-linux-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/235870038595292183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/235870038595292183'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/substring-in-linux-script.html' title='substring in linux script'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7848973335024162382</id><published>2009-02-13T11:23:00.002+05:30</published><updated>2009-04-15T17:54:55.457+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>test command</title><content type='html'>Let there is a file while.sh and dir vikas&lt;br /&gt;[root@vikas Desktop]# test -e while.sh                 &lt;br /&gt;[root@vikas Desktop]# echo $?&lt;br /&gt;0&lt;br /&gt;[root@vikas Desktop]# test -e while&lt;br /&gt;[root@vikas Desktop]# echo $?&lt;br /&gt;1&lt;br /&gt;[root@vikas Desktop]# test -d vikas&lt;br /&gt;[root@vikas Desktop]# echo $?&lt;br /&gt;0&lt;br /&gt;[root@vikas Desktop]# test -d vikass&lt;br /&gt;[root@vikas Desktop]# echo $?&lt;br /&gt;1&lt;br /&gt;[root@vikas Desktop]#  test -e while.sh &amp;amp;&amp;amp; echo "Yes."   [if file is there echo yes]&lt;br /&gt;Yes.&lt;br /&gt;[root@vikas Desktop]#  test -e whiless.sh &amp;amp;&amp;amp; echo "Yes."&lt;br /&gt;[root@vikas Desktop]#  test -e whiless.sh || echo "no."       [if file is not there echo no]&lt;br /&gt;no.&lt;br /&gt;[root@vikas Desktop]#  test -e while.sh || echo "no." &lt;br /&gt;[root@vikas Desktop]#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7848973335024162382?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7848973335024162382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/test-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7848973335024162382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7848973335024162382'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/test-command.html' title='test command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-8498234444278461966</id><published>2009-02-13T11:14:00.000+05:30</published><updated>2009-02-13T11:15:06.763+05:30</updated><title type='text'>which and whereis</title><content type='html'>whereis  - locate the binary, source, and manual page files for a command&lt;br /&gt; which              - shows the full path of (shell) commands&lt;br /&gt;which                Displays where a particular program in your path is located.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-8498234444278461966?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/8498234444278461966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/which-and-whereis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8498234444278461966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/8498234444278461966'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/which-and-whereis.html' title='which and whereis'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1014531690457215136</id><published>2009-02-12T17:39:00.002+05:30</published><updated>2009-04-14T12:58:05.680+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>Script changing IP and hostname in fedora, use of sed</title><content type='html'>#!/bin/sh&lt;br /&gt;###############&lt;br /&gt;#    For FEDORA&lt;br /&gt;#    Use at your own risk...........................&lt;br /&gt;#    Reading.....&lt;br /&gt;###############&lt;br /&gt;echo -e "Enter IP address"&lt;br /&gt;read ip&lt;br /&gt;while [ `echo $ip | grep -io [.] | wc -l` != 3 ]&lt;br /&gt; do&lt;br /&gt;    echo -e "Invalid ip, Enter again:"&lt;br /&gt;    read ip&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;echo -e "Enter host name"&lt;br /&gt;read hst&lt;br /&gt;while [ `echo $hst | grep -io [.] | wc -l` != 2 ]&lt;br /&gt; do&lt;br /&gt;    echo -e "Invalid hst, Enter again:"&lt;br /&gt;    read hst&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;#echo -e "Enter Network address"&lt;br /&gt;#read ip&lt;br /&gt;#echo -e "Enter Gateway address"&lt;br /&gt;#read ip&lt;br /&gt;&lt;br /&gt;###############&lt;br /&gt;#    Warn!&lt;br /&gt;###############&lt;br /&gt;echo -en "You are going to change Hostname as $hst and IP as $ip:\nWrong data may harm:\n"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;###############&lt;br /&gt;#    CHNAGE IF YES&lt;br /&gt;###############&lt;br /&gt;while [ 1 ]&lt;br /&gt;  do&lt;br /&gt;    read -p "Enter [Y/N]" rst&lt;br /&gt;    case $rst in&lt;br /&gt;              y|Y)&lt;br /&gt;        ###############&lt;br /&gt;        #    Changing hostname  /etc/sysconfig/network  file&lt;br /&gt;        ###############&lt;br /&gt;        echo -en "NETWORKING=yes\nHOSTNAME=$hst" | cat &gt; /tmp/temnet;&lt;br /&gt;        cp -f /tmp/temnet /etc/sysconfig/network;&lt;br /&gt;        rm -f /tmp/temnet;&lt;br /&gt;&lt;br /&gt;        ###############&lt;br /&gt;        #    Changing IP address    /etc/sysconfig/network-scripts/ifcfg-eth0   file&lt;br /&gt;        ###############&lt;br /&gt;        sed '/IPADDR/d' /etc/sysconfig/network-scripts/ifcfg-eth0  &gt; /tmp/tmpip;&lt;br /&gt;        sed -i '5i\IPADDR='$ip /tmp/tmpip;&lt;br /&gt;        cp -f /tmp/tmpip /etc/sysconfig/network-scripts/ifcfg-eth0;&lt;br /&gt;        rm -f /tmp/tmpip;&lt;br /&gt;&lt;br /&gt;        ###############&lt;br /&gt;        #    Changing in DNS file HERE /var/named/chroot/var/named/coralsip.com.zone&lt;br /&gt;        ###############&lt;br /&gt;        ##  dn="$hst    IN    A    $ip"&lt;br /&gt;        sed '/'$hst'.    IN    A    '$ip'/d' /var/named/chroot/var/named/coralsip.com.zone &gt; /tmp/tmpdns;&lt;br /&gt;        sed -i '12i\'$hst'.    IN    A    '$ip /tmp/tmpdns;&lt;br /&gt;        cp -f /tmp/tmpdns /var/named/chroot/var/named/coralsip.com.zone;&lt;br /&gt;        rm -f /tmp/tmpdns;&lt;br /&gt;&lt;br /&gt;        ###############&lt;br /&gt;        #    Adding in /etc/hosts file&lt;br /&gt;        ###############&lt;br /&gt;        #host_line="$ip    $hst    ` echo $hst | cut -f1 -d"."`";&lt;br /&gt;        echo -en "# Do not remove the following line, or various programs\n# that require network functionality will fail.\n127.0.0.1    localhost.localdomain    localhost\n" | cat &gt; /tmp/tmphost;&lt;br /&gt;        echo "$ip    $hst    ` echo $hst | cut -f1 -d"."`"| cat &gt;&gt; /tmp/tmphost;&lt;br /&gt;        cp -f /tmp/tmphost /etc/hosts;&lt;br /&gt;        rm -f /tmp/tmphost;&lt;br /&gt;&lt;br /&gt;        ###############&lt;br /&gt;        #    Restarting services&lt;br /&gt;        ###############&lt;br /&gt;        hostname $hst;&lt;br /&gt;        service network restart;&lt;br /&gt;        service named restart;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        exit;;&lt;br /&gt;      n|N)     echo -e "Exit without changing." ;exit ;;&lt;br /&gt;      *)     echo -e "Wrong Input!!! Please enter [y/n]";&lt;br /&gt;        &lt;br /&gt;  esac&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#old_ip= get_def_addr&lt;br /&gt;#sed -e 's/IPADDR='$old_ip'/IPADDR='$ip'/g' /etc/sysconfig/network-scripts/ifcfg-eth0  &gt; /root/Desktop/tmp&lt;br /&gt;##   hostname $hst&lt;br /&gt;##   service network restart&lt;br /&gt;#cat  /etc/sysconfig/network | tr 'HOSTNAME=vikas.coralsip.com' 'HOSTNAME=$hst'&lt;br /&gt;#sleep 1&lt;br /&gt;#sed 's/IPADDR=`get_def_addr`/IPADDR=$ip/g' /etc/sysconfig/network-scripts/ifcfg-eth0&lt;br /&gt;#sleep 1&lt;br /&gt;#sed 's/HOSTNAME=`echo $hm`/HOSTNAME=`echo $hst`/g' /etc/sysconfig/network &gt; /root/Desktop/tmp&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1014531690457215136?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1014531690457215136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/script-changing-ip-and-hostname-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1014531690457215136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1014531690457215136'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/script-changing-ip-and-hostname-in.html' title='Script changing IP and hostname in fedora, use of sed'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-3793312304001507166</id><published>2009-02-12T14:17:00.003+05:30</published><updated>2009-04-14T13:14:52.321+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Find'/><title type='text'>finding the string  in the files in dir</title><content type='html'>finding the string&lt;br /&gt;find . -iname '*php' | xargs grep 'string' -sl&lt;br /&gt;&lt;br /&gt;Another common search for me, is to just look at the recently updated files:&lt;br /&gt;find . -iname '*php' -mtime -1 | xargs grep 'string' -sl&lt;br /&gt;&lt;br /&gt;would find only files edited today, whilst the following finds the files older than today:&lt;br /&gt;find . -iname '*php' -mtime +1 | xargs grep 'string' -sl&lt;br /&gt;&lt;br /&gt;&lt;pre class="bbcodeblock" dir="ltr" style="border: 1px inset ; margin: 0px -99999px 0px 0px; padding: 3px; overflow: auto; width: 98%; height: 34px; text-align: left;"&gt;find / -type f -print0 | xargs -0 grep -i pattern&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-3793312304001507166?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/3793312304001507166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/finding-string-in-files-in-dir.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3793312304001507166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/3793312304001507166'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/finding-string-in-files-in-dir.html' title='finding the string  in the files in dir'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2212254273119654285</id><published>2009-02-12T11:47:00.001+05:30</published><updated>2009-02-12T11:49:31.439+05:30</updated><title type='text'>setting kernel parameters</title><content type='html'>use  &lt;span id="sort1"&gt;&lt;span class="tdvamseel"&gt;sysctl utility.. or try using /etc/sysctl.conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[print all kernal parameters]&lt;br /&gt;sysctl -a print&lt;br /&gt;&lt;br /&gt;whatis sysctl&lt;br /&gt;sysctl               (2)  - read/write system parameters&lt;br /&gt;sysctl               (8)  - configure kernel parameters at runtime&lt;br /&gt;sysctl.conf [sysctl] (5)  - sysctl(8) preload/configuration file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2212254273119654285?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2212254273119654285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/setting-kernel-parameters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2212254273119654285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2212254273119654285'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/setting-kernel-parameters.html' title='setting kernel parameters'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6192777004250792938</id><published>2009-02-12T11:42:00.001+05:30</published><updated>2009-04-14T16:38:06.840+05:30</updated><title type='text'>Grub is crashed, how to start linux then.</title><content type='html'>Reboot using the linux cd using "linux rescue" option and then after that&lt;br /&gt;&lt;br /&gt;chroot /mnt/sysimage&lt;br /&gt;cd /mnt/sysimage/etc/&lt;br /&gt;grub-install  /dev/sda(x) &lt;your_primary_drive&gt;&lt;/your_primary_drive&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6192777004250792938?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6192777004250792938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/when-grub-is-crashed-then-how-to-start.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6192777004250792938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6192777004250792938'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/when-grub-is-crashed-then-how-to-start.html' title='Grub is crashed, how to start linux then.'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6019431252400690065</id><published>2009-02-12T11:27:00.001+05:30</published><updated>2009-02-12T11:29:21.064+05:30</updated><title type='text'>Less in Unix</title><content type='html'>&lt;i&gt;Less&lt;/i&gt; is a program similar to &lt;i&gt;more&lt;/i&gt;  but which allows backward movement in the file as well as forward movement. Also, &lt;i&gt;less&lt;/i&gt; does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like &lt;i&gt;vi&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Less&lt;/i&gt; uses termcap (or terminfo on some systems), so it can run on a variety of terminals. There is even limited support for hardcopy terminals. (On a hardcopy terminal, lines which should be printed at the top of the screen are prefixed with a caret.)&lt;br /&gt;whatis less&lt;br /&gt;less                 (1)  - opposite of more&lt;br /&gt;less                 (3pm)  - perl pragma to request less of something from the compiler&lt;br /&gt;less                (rpm) - A text file browser similar to more, but better&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;IN UNIX less IN MORE THAN more&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Moving Commands:&lt;br /&gt;&lt;br /&gt;Commands marked with * may be preceded by a number, N.&lt;br /&gt;Notes in parentheses indicate the behavior if N is given.&lt;br /&gt;&lt;br /&gt; e  ^E  j  ^N  CR  *  Forward  one line   (or N lines).&lt;br /&gt; y  ^Y  k  ^K  ^P  *  Backward one line   (or N lines).&lt;br /&gt; f  ^F  ^V  SPACE  *  Forward  one window (or N lines).&lt;br /&gt; b  ^B  ESC-v      *  Backward one window (or N lines).&lt;br /&gt; z                 *  Forward  one window (and set window to N).&lt;br /&gt; w                 *  Backward one window (and set window to N).&lt;br /&gt; ESC-SPACE         *  Forward  one window, but don't stop at end-of-file.&lt;br /&gt; d  ^D             *  Forward  one half-window (and set half-window to N).&lt;br /&gt; u  ^U             *  Backward one half-window (and set half-window to N).&lt;br /&gt; ESC-(  RightArrow *  Left  8 character positions (or N positions).&lt;br /&gt; ESC-)  LeftArrow  *  Right 8 character positions (or N positions).&lt;br /&gt; F                    Forward forever; like "tail -f".&lt;br /&gt; r  ^R  ^L            Repaint screen.&lt;br /&gt; R                    Repaint screen, discarding buffered input.&lt;br /&gt;&lt;br /&gt; h  H                 Display this help.&lt;br /&gt; q  :q  Q  :Q  ZZ     Exit.&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6019431252400690065?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6019431252400690065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/less-in-unix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6019431252400690065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6019431252400690065'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/less-in-unix.html' title='Less in Unix'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6510805811671387511</id><published>2009-02-12T11:02:00.005+05:30</published><updated>2009-04-14T13:11:29.401+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>php code using seamophores, shared memory and related functions</title><content type='html'>START OF FILE ONE&lt;br /&gt;&lt;br /&gt;$shm_id = shmop_open(0xff3, "c", 0644, 100);&lt;br /&gt;echo $shm_id;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;$shm_size = shmop_size($shm_id);&lt;br /&gt;echo $shm_size;&lt;br /&gt;$my_string = shmop_read($shm_id, 12, 5);&lt;br /&gt;echo "The data inside shared memory was: ".$my_string."\n";&lt;br /&gt;&lt;br /&gt;shmop_delete($shm_id);&lt;br /&gt;shmop_close($shm_id);&lt;br /&gt;&lt;br /&gt;END OF FILE 1&lt;br /&gt;&lt;br /&gt;START OF FILE 2 semaphores&lt;br /&gt;&lt;br /&gt;$MEMSIZE = 128; //  size of shared memory to allocate&lt;br /&gt;$SEMKEY = 11;   //  Semaphore key&lt;br /&gt;$SHMKEY = 51;   //  Shared memory key&lt;br /&gt;&lt;br /&gt;echo "Start.\n";&lt;br /&gt;&lt;br /&gt;// Create a semaphore&lt;br /&gt;$sem_id = sem_get($SEMKEY, 1);&lt;br /&gt;if ($sem_id === false)&lt;br /&gt;{&lt;br /&gt;    echo "Failed to create semaphore";&lt;br /&gt;    exit;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;    echo "Created semaphore $sem_id.\n";&lt;br /&gt;&lt;br /&gt;// Acquire the semaphore&lt;br /&gt;if (! sem_acquire($sem_id))&lt;br /&gt;{&lt;br /&gt;    echo "Failed to acquire semaphore $sem_id.\n";&lt;br /&gt;    sem_remove($sem_id);&lt;br /&gt;    exit;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;    echo "Success acquiring semaphore $sem_id.\n";&lt;br /&gt;&lt;br /&gt;// Attach shared memory&lt;br /&gt;$shm_id = shm_attach($SHMKEY, $MEMSIZE);&lt;br /&gt;if ($shm_id === false)&lt;br /&gt;{&lt;br /&gt;    echo "Fail to attach shared memory.\n";&lt;br /&gt;    sem_remove($sem_id);&lt;br /&gt;    exit;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;    echo "Success to attach shared memory : $shm_id.\n";&lt;br /&gt;&lt;br /&gt;// Write variable 1&lt;br /&gt;if (!shm_put_var($shm_id, 1, "Vikas"))&lt;br /&gt;{&lt;br /&gt;    echo "Failed to put var 1 in shared memory $shm_id.\n";&lt;br /&gt;&lt;br /&gt;    // Clean up nicely&lt;br /&gt;    sem_remove($sem_id);&lt;br /&gt;    shm_remove($shm_id);&lt;br /&gt;    exit;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;    echo "Wrote var1 to shared memory.\n";&lt;br /&gt;&lt;br /&gt;// Write variable 2&lt;br /&gt;if (!shm_put_var($shm_id, 2, "coral"))&lt;br /&gt;{&lt;br /&gt;    echo "Failed to put var 2 on shared memory $shm_id.\n";&lt;br /&gt;&lt;br /&gt;    // Clean up nicely&lt;br /&gt;    sem_remove($sem_id);&lt;br /&gt;    shm_remove ($shm_id);&lt;br /&gt;    exit;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;    echo "Wrote var2 to shared memory.\n";&lt;br /&gt;&lt;br /&gt;// Read variable 1&lt;br /&gt;$var1 = shm_get_var($shm_id, 1);&lt;br /&gt;if ($var1 === false)&lt;br /&gt;{&lt;br /&gt;    echo "Failed to retreive Var 1 from Shared memory $shm_id, " .&lt;br /&gt;         "return value=$var1.\n";&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;    echo "Read var1=$var1.\n";&lt;br /&gt;&lt;br /&gt;// Read variable 1&lt;br /&gt;$var2 = shm_get_var ($shm_id, 2);&lt;br /&gt;if ($var1 === false)&lt;br /&gt;{&lt;br /&gt;     echo "Failed to retrive Var 2 from Shared memory $shm_id, " .&lt;br /&gt;          "return value=$var2.\n";&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;    echo "Read var2=$var2.\n";&lt;br /&gt;&lt;br /&gt;//sleep (60);&lt;br /&gt;&lt;br /&gt;// Release semaphore&lt;br /&gt;if (!sem_release($sem_id))&lt;br /&gt;    echo "Failed to release $sem_id semaphore.\n";&lt;br /&gt;else&lt;br /&gt;    echo "Semaphore $sem_id released.\n";&lt;br /&gt;&lt;br /&gt;// Remove shared memory segment&lt;br /&gt;if (shm_remove ($shm_id))&lt;br /&gt;    echo "Shared memory successfully removed.\n";&lt;br /&gt;else&lt;br /&gt;    echo "Failed to remove $shm_id shared memory.\n";&lt;br /&gt;&lt;br /&gt;// Remove semaphore&lt;br /&gt;if (sem_remove($sem_id))&lt;br /&gt;    echo "Semaphore removed successfully.\n";&lt;br /&gt;else&lt;br /&gt;    echo "Failed to remove $sem_id semaphore.\n";&lt;br /&gt;&lt;br /&gt;echo "End.\n";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;END OF FILE2&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6510805811671387511?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6510805811671387511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/php-code-using-seamophores-shared.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6510805811671387511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6510805811671387511'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/php-code-using-seamophores-shared.html' title='php code using seamophores, shared memory and related functions'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1627258451302868922</id><published>2009-02-12T11:02:00.002+05:30</published><updated>2009-02-12T11:04:18.437+05:30</updated><title type='text'>Unix MORE Command</title><content type='html'>&lt;h3&gt; &lt;a name="more"&gt; more(In UNIX)&lt;/a&gt; &lt;/h3&gt;  &lt;p&gt; More is a command used to read text files.  For example, we could do this:  &lt;/p&gt;&lt;pre&gt;   % more poems&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; The effect of this to let you read the file "poems ".  It probably will not fit in one screen, so you need to know how to "turn pages".  Here are the basic commands:  &lt;/p&gt;&lt;ul&gt;&lt;li&gt; &lt;b&gt;q&lt;/b&gt; --- quit more  &lt;/li&gt;&lt;li&gt; &lt;b&gt;spacebar&lt;/b&gt; --- read next page  &lt;/li&gt;&lt;li&gt; &lt;b&gt;return key&lt;/b&gt; --- read next line  &lt;/li&gt;&lt;li&gt; &lt;b&gt;b&lt;/b&gt; --- go back one page  &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1627258451302868922?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1627258451302868922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/unix-more-command.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1627258451302868922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1627258451302868922'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/unix-more-command.html' title='Unix MORE Command'/><author><name>A.K.Pandey</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-4625976992995061663</id><published>2009-02-11T18:04:00.004+05:30</published><updated>2009-04-14T13:11:55.550+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Simple php script to access shared memory by two php programs using ftok</title><content type='html'>PHP supports shared memory which can be used to store and retrieve data across processes. Shared memory is used for caching frequently used data in memory for php scripts on the same serve&lt;br /&gt;&lt;br /&gt;FILE 1&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;$key = 'mykey'; // Key to store data with&lt;br /&gt;&lt;br /&gt;$shm_key = ftok('afile','POINTER');&lt;br /&gt;&lt;br /&gt;$data =  shm_attach($shm_key);&lt;br /&gt;&lt;br /&gt;$test = "vikas";&lt;br /&gt;shm_put_var($data,$inmem,$test); // Save the data in shared memory&lt;br /&gt;&lt;br /&gt;echo shm_get_var($data,$mykey);&lt;br /&gt;shm_detach($data); // Disconnects from shared memory segment;  data remains there&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FILE2&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;$key = 'mykey';&lt;br /&gt;$shm_key = ftok('afile','POINTER');&lt;br /&gt;$data =  shm_attach($shm_key);&lt;br /&gt;echo shm_get_var($data,$mykey);&lt;br /&gt;shm_detach($data);&lt;br /&gt;&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-4625976992995061663?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/4625976992995061663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/simple-php-script-to-access-shared.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4625976992995061663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/4625976992995061663'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/simple-php-script-to-access-shared.html' title='Simple php script to access shared memory by two php programs using ftok'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-494318224311155208</id><published>2009-02-11T15:23:00.005+05:30</published><updated>2009-02-11T15:43:10.820+05:30</updated><title type='text'>ipc inter process communication (shared memory) linux commnad</title><content type='html'>[root@vikas ~]# whatis ipcs&lt;br /&gt;ipcs                 (1p)  - report XSI interprocess communication facilities status&lt;br /&gt;ipcs                 (1)  - provide information on ipc facilities&lt;br /&gt;&lt;span name="intelliTxt" id="intelliTxt"&gt;he &lt;code&gt;ipcs&lt;/code&gt; command is a  powerful  mechanism for spying on the kernel memory of IPC objects.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ipcs -s&lt;br /&gt;ipcs -m&lt;br /&gt;ipcs -q&lt;br /&gt;ipcs -i id&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Unix Shared Memory Variables&lt;/em&gt;&lt;/p&gt;  &lt;table border="1" cellpadding="6" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;SHMMAX&lt;/code&gt;&lt;/td&gt; &lt;td&gt;The maximum amount of shared memory, normally 131072 bytes&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;SHMMIN&lt;/code&gt;&lt;/td&gt; &lt;td&gt;The minimum amount of shared memory, normally 1 byte&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;SHMMNI&lt;/code&gt;&lt;/td&gt; &lt;td&gt;The maximum number of shared memory segments in the system, normally 100&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;SHMSEG&lt;/code&gt;&lt;/td&gt; &lt;td&gt;The maximum number of shared memory segments per process, normally 6&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;IPCRM&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span name="intelliTxt" id="intelliTxt"&gt;&lt;p&gt;&lt;code&gt;ipcrm&lt;/code&gt; deletes IPC objects from the kernel. However, as IPC objects can be deleted through system calls in the user's program, there is often no need to delete them by hand.  The command is very simple:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;ipcrm -&lt;em&gt;type&lt;/em&gt; &lt;em&gt;id&lt;/em&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;[root@vikas ~]# whatis ipcrm&lt;br /&gt;ipcrm                (1p)  - remove an XSI message queue, semaphore set, or shared memory segment identifier&lt;br /&gt;ipcrm                (1)  - remove a message queue, semaphore set or shared memory id&lt;br /&gt;&lt;/p&gt;usage: ipcrm [ [-q msqid] [-m shmid] [-s semid]&lt;br /&gt;        [-Q msgkey] [-M shmkey] [-S semkey] ... ]&lt;br /&gt;&lt;br /&gt;&lt;p&gt;IPCClean&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ipcclean&lt;br /&gt;ipcclean             (1)  - remove shared memory and semaphores from a failed PostgreSQL server&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-494318224311155208?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/494318224311155208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/ipc-inter-process-communication-shared.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/494318224311155208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/494318224311155208'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/ipc-inter-process-communication-shared.html' title='ipc inter process communication (shared memory) linux commnad'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2658768096535785084</id><published>2009-02-10T17:22:00.000+05:30</published><updated>2009-02-10T17:23:42.784+05:30</updated><title type='text'>BOA web server</title><content type='html'>   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="GENERATOR" content="OpenOffice.org 2.3  (Linux)"&gt; 	 	 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt;   &lt;p&gt;&lt;span lang="en"&gt;	Boa is a tiny web server that also offers extremely high performance. It is specifically designed to run on UNIX-like systems, which includes Linux, as well as the *BSD systems. To get all the legal stuff out of the way, Boa is available for free and is covered by the GNU Public License (GPL). The source code for Boa, as well as documentation, can be found at &lt;a href="http://www.boa.org/"&gt;http://www.boa.org/&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p lang="en"&gt;The following point taken from the Boa web site :  &lt;/p&gt; &lt;blockquote&gt;“ &lt;span lang="en"&gt;&lt;i&gt;Boa currently seems to be the favorite web server in the embedded crowd, and embedded Linux, despite all the marketing hype, really is a big deal. Supposedly, an older version of Boa, v0.92q, runs in 32K address space on m68k, like used in uClinux. &lt;/i&gt;&lt;/span&gt;&lt;span lang="en"&gt;”&lt;/span&gt;&lt;/blockquote&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2658768096535785084?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2658768096535785084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/boa-web-server.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2658768096535785084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2658768096535785084'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/boa-web-server.html' title='BOA web server'/><author><name>Prashant Saurabh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-5416242172680282176</id><published>2009-02-10T16:43:00.004+05:30</published><updated>2009-04-14T13:02:01.186+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting Tips'/><title type='text'>script to check status of services and mail status</title><content type='html'>[if necessary use script in crontab, run auto. after a particular interval]&lt;br /&gt;msg="At `date` status of services"&lt;br /&gt;&lt;br /&gt;a=`ps -A | pgrep sipXproxy | head -n 1`&lt;br /&gt;&lt;br /&gt;if [ ! $a ] ; then&lt;br /&gt;   echo "sipx is stopped"  &lt;br /&gt;   msg=$msg"\n1) sipx is stopped"&lt;br /&gt;else&lt;br /&gt;   echo "sipx is running"&lt;br /&gt;   msg=$msg"\n1) sipx is running"&lt;br /&gt;fi&lt;br /&gt;sleep 1&lt;br /&gt;&lt;br /&gt;b=`ps -A | pgrep siproxd | head -n 1`&lt;br /&gt;&lt;br /&gt;if [ ! $b ] ; then&lt;br /&gt;   echo "siproxd is stopped"&lt;br /&gt;   msg=$msg"\n2) siproxd is stopped"&lt;br /&gt;else&lt;br /&gt;   echo "siproxd is running"&lt;br /&gt;   msg=$msg"\n2) siproxd is running"&lt;br /&gt;fi&lt;br /&gt;sleep 1&lt;br /&gt;&lt;br /&gt;c=`ps -A | pgrep named | head -n 1`&lt;br /&gt;&lt;br /&gt;if [ ! $c ] ; then&lt;br /&gt;   echo "named is stopped"  &lt;br /&gt;   msg=$msg"\n3) named is stopped"&lt;br /&gt;else&lt;br /&gt;   echo "named is running"&lt;br /&gt;   msg=$msg"\n3) named is running"&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;sleep 1&lt;br /&gt;&lt;br /&gt;d=`ps -A | pgrep httpd | head -n 1`&lt;br /&gt;&lt;br /&gt;if [ ! $d ] ; then&lt;br /&gt;   echo "httpd is stopped"  &lt;br /&gt;   msg=$msg"\n4) httpd is stopped"&lt;br /&gt;else&lt;br /&gt;   echo "httpd is running"&lt;br /&gt;   msg=$msg"\n4) httpd is running"&lt;br /&gt;fi&lt;br /&gt;a=""&lt;br /&gt;b=""&lt;br /&gt;c=""&lt;br /&gt;d=""&lt;br /&gt;&lt;br /&gt;echo -e "\n$msg"&lt;br /&gt;&lt;br /&gt;#echo $msg | sendmail mail_ID_here&lt;br /&gt;&lt;br /&gt;#xterm &amp;amp;&lt;br /&gt;#sleep 3&lt;br /&gt;#wall $msg&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-5416242172680282176?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/5416242172680282176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/script-to-check-status-of-services-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5416242172680282176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5416242172680282176'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/script-to-check-status-of-services-and.html' title='script to check status of services and mail status'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-911391064698633922</id><published>2009-02-10T15:08:00.002+05:30</published><updated>2009-04-14T13:03:13.816+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='File and Folder operations'/><title type='text'>linux commands to compare two files</title><content type='html'>[root@vikas current_task]# whatis cmp&lt;br /&gt;cmp                  (1)  - compare two files&lt;br /&gt;cmp                  (1p)  - compare two files&lt;br /&gt;[root@vikas current_task]# whatis comp&lt;br /&gt;comp: nothing appropriate&lt;br /&gt;[root@vikas current_task]# whatis comm&lt;br /&gt;comm                 (1)  - compare two sorted files line by line&lt;br /&gt;comm                 (1p)  - select or reject lines common to two files&lt;br /&gt;[root@vikas current_task]# whatis diff&lt;br /&gt;diff                 (1)  - find differences between two files&lt;br /&gt;diff                 (1p)  - compare two files&lt;br /&gt;diff-jars            (1)  - output the differences between two JAR files&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-911391064698633922?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/911391064698633922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/linux-commands-to-compare-two-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/911391064698633922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/911391064698633922'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/linux-commands-to-compare-two-files.html' title='linux commands to compare two files'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-2073862447843598811</id><published>2009-02-10T15:02:00.004+05:30</published><updated>2009-04-14T12:37:12.549+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='grep'/><title type='text'>Counting empty lines in a file</title><content type='html'>[Count empty lines]&lt;br /&gt;grep '^$' /root/Desktop/chk_services.sh | wc -l&lt;br /&gt;&lt;br /&gt;[Count lines which are not empty]&lt;br /&gt;grep -v '^$' /root/Desktop/chk_services.sh | wc -l&lt;br /&gt;&lt;br /&gt;[Count lines start with hash #]&lt;br /&gt;grep  '^#' /root/Desktop/chk_services.sh | wc -l&lt;br /&gt;&lt;br /&gt;[Count lines which dont start with #]&lt;br /&gt;grep  -v '^#' /root/Desktop/chk_services.sh | wc -l&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-2073862447843598811?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/2073862447843598811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/counting-empty-lines-in-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2073862447843598811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/2073862447843598811'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/counting-empty-lines-in-file.html' title='Counting empty lines in a file'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-5314255932430858848</id><published>2009-02-10T14:59:00.003+05:30</published><updated>2009-04-14T12:22:19.337+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='grep'/><title type='text'>Display file without empty lines and comments</title><content type='html'>[This will display file contents, but dont displays the empty files and lines starting with # i.e comments]&lt;br /&gt;&lt;br /&gt;grep -v '^#' /root/Desktop/chk_services.sh | grep -v '^$&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-5314255932430858848?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/5314255932430858848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/display-file-without-empty-lines-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5314255932430858848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/5314255932430858848'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/display-file-without-empty-lines-and.html' title='Display file without empty lines and comments'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-7053423782379648774</id><published>2009-02-10T14:51:00.003+05:30</published><updated>2009-04-14T13:02:34.349+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Find'/><title type='text'>Find 3 files bigest in size in the current dir including sub dirs</title><content type='html'>find . -type f -exec ls -s {} \; | sort -n -r | head -3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-7053423782379648774?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/7053423782379648774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/find-3-files-bigest-in-size-in-current.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7053423782379648774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/7053423782379648774'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/find-3-files-bigest-in-size-in-current.html' title='Find 3 files bigest in size in the current dir including sub dirs'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-6123648369498401787</id><published>2009-02-10T14:39:00.001+05:30</published><updated>2009-02-10T14:41:15.135+05:30</updated><title type='text'>Make alias  of a linux command</title><content type='html'>alias cmd='linux cod args'&lt;br /&gt;alias vik='ls -l'&lt;br /&gt;&lt;br /&gt;now vik works as 'ls -l'&lt;br /&gt;&lt;br /&gt;Unalias&lt;br /&gt;&lt;br /&gt;unalias vik&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-6123648369498401787?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/6123648369498401787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/make-alias-of-linux-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6123648369498401787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/6123648369498401787'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/make-alias-of-linux-command.html' title='Make alias  of a linux command'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-1311365520418119415</id><published>2009-02-07T13:46:00.003+05:30</published><updated>2009-04-14T16:51:46.968+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='split'/><title type='text'>split a file into chunks</title><content type='html'>[This will split file in to small parts named CHNKS_aa , ab so on ]&lt;br /&gt;split -b 1m file CHNKS_&lt;br /&gt;&lt;br /&gt;split -b 30k -a 1 mx_doc21.doc cnks_&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-1311365520418119415?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/1311365520418119415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/split-file-into-chunks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1311365520418119415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/1311365520418119415'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/split-file-into-chunks.html' title='split a file into chunks'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936405915665624582.post-998404366121951396</id><published>2009-02-07T13:13:00.001+05:30</published><updated>2009-02-07T13:15:05.782+05:30</updated><title type='text'>Information about user who are login</title><content type='html'>[root@vikas Desktop]# w&lt;br /&gt; 13:12:25 up  3:15,  2 users,  load average: 0.25, 0.42, 0.30&lt;br /&gt;USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT&lt;br /&gt;root     tty7     :0               10:18    0.00s  5:17   5:17  /usr/bin/X :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7&lt;br /&gt;root     pts/1    :0.0             10:18    0.00s  1.58s  0.00s w&lt;br /&gt;&lt;br /&gt;[root@vikas Desktop]# who&lt;br /&gt;root     tty7         2009-02-07 10:18 (:0)&lt;br /&gt;root     pts/1        2009-02-07 10:18 (:0.0)&lt;br /&gt;&lt;br /&gt;[root@vikas Desktop]# finger&lt;br /&gt;Login     Name          Tty      Idle  Login Time   Office     Office Phone&lt;br /&gt;root      VikasSharma   tty7           Feb  7 10:18 (:0)&lt;br /&gt;root      VikasSharma   pts/1          Feb  7 10:18 (:0.0)&lt;br /&gt;[root@vikas Desktop]#&lt;br /&gt;&lt;br /&gt;chfn -- change the finger information&lt;br /&gt;chsh  --- to change the shell&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936405915665624582-998404366121951396?l=linuxbeginer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxbeginer.blogspot.com/feeds/998404366121951396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/information-about-user-who-are-login.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/998404366121951396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936405915665624582/posts/default/998404366121951396'/><link rel='alternate' type='text/html' href='http://linuxbeginer.blogspot.com/2009/02/information-about-user-who-are-login.html' title='Information about user who are login'/><author><name>Vikas Sharma</name><uri>http://www.blogger.com/profile/11326342563165873662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://3.bp.blogspot.com/_41mPZPhe_yk/St7w26GPARI/AAAAAAAAAMM/AwBuA822Oiw/S220/vikas.jpg'/></author><thr:total>0</thr:total></entry></feed>
