<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Short hints about Linux</title>
	<atom:link href="http://linux.bgsnow.com/feed" rel="self" type="application/rss+xml" />
	<link>http://linux.bgsnow.com</link>
	<description></description>
	<pubDate>Sun, 07 Dec 2008 18:31:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Setting up a fast and simple web gallery</title>
		<link>http://linux.bgsnow.com/setting-up-a-fast-and-simple-web-gallery.php</link>
		<comments>http://linux.bgsnow.com/setting-up-a-fast-and-simple-web-gallery.php#comments</comments>
		<pubDate>Wed, 05 Nov 2008 21:10:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=113</guid>
		<description><![CDATA[There are endless articles on how to set up a web gallery - from sophisticated albums with user interaction to plain html pages. My best choice is Menalto's Gallery because of its extensive features and huge caching (fast speed). However, sometimes I just need a more simple solution with these objectives:
- Properly resized thumbnails - [...]]]></description>
			<content:encoded><![CDATA[<p>There are endless articles on how to set up a web gallery - from sophisticated albums with user interaction to plain html pages. My best choice is Menalto's Gallery because of its extensive features and huge caching (fast speed). However, sometimes I just need a more simple solution with these objectives:</p>
<p>- Properly resized thumbnails - beware, some scripts just shrink the photos and do not create thumbnails <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>- Watermarks - very important, because my best friend is a photograpger and paranoic</p>
<p>- Resized images - again my friend sends me very big images which are too slow to be downloaded</p>
<p>So the easiest solution to the above is:</p>
<p>1. Resize my images with Imagemagick's convert:</p>
<p>convert -resize 800 "_MG_*" my-pics.jpg</p>
<p>This resizes correspondingly all images to be 800 px wide. This also changes their name from _MG_ something to a name of your choice - extra bonus <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>2. Set the watermark:</p>
<p>for i in my-pics*; do composite -gravity SouthEast mylogo.gif $i $i; done</p>
<p>This sets mylogo.gif as the watermark for all images. The orientation is SouthEst, meaning the logo will be put in the right-down corner of the photo.</p>
<p>3. Use <a href="http://home.gna.org/llgal/" target="_blank">llgal</a> to generate the html pages and thumbnails. Llgal comes with most Linux distributions and is a fast and elegant script <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> You just have to issue 'llgal' in the directory of your photos - it takes care about everything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/setting-up-a-fast-and-simple-web-gallery.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>Changing image preview size for attached images in PhpBB3</title>
		<link>http://linux.bgsnow.com/changing-image-preview-size-for-attached-images-in-phpbb3.php</link>
		<comments>http://linux.bgsnow.com/changing-image-preview-size-for-attached-images-in-phpbb3.php#comments</comments>
		<pubDate>Tue, 28 Oct 2008 20:22:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=110</guid>
		<description><![CDATA[Imagine having a nice PhpBB3 forum where you'd love to attach inline photos in your posts. The problem is that max height for the image size is set to 350 by default for the prosilver theme. I managed to change it only in the following way:
Open your forums mysql database and find the table phpbb_styles_theme. [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine having a nice PhpBB3 forum where you'd love to attach inline photos in your posts. The problem is that max height for the image size is set to 350 by default for the prosilver theme. I managed to change it only in the following way:</p>
<p>Open your forums mysql database and find the table phpbb_<span class="item">styles_theme. There go to row </span>theme_name=prosilver, find theme_data field. There will be your whole css for the theme loaded. Find:</p>
<p>.attach-image {<br />
margin: 3px 0;<br />
width: 100%;<br />
max-height: 350px;<br />
overflow: auto;<br />
}</p>
<p>Change it to:</p>
<p>.attach-image {<br />
margin: 3px 0;<br />
width: 100%;<br />
max-height: <strong>1350px</strong>;<br />
overflow: auto;<br />
}</p>
<p>There are two things to consider:</p>
<p>1. The above is probably loaded at some time from the file styles/prosilver/theme/content.css. It is a good idea to make the same change there too.</p>
<p>2. Make sure to clear your forum's cache, i.e. delete everything inside the cache/ directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/changing-image-preview-size-for-attached-images-in-phpbb3.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>Having fun with /dev/console</title>
		<link>http://linux.bgsnow.com/having-fun-with-devconsole.php</link>
		<comments>http://linux.bgsnow.com/having-fun-with-devconsole.php#comments</comments>
		<pubDate>Tue, 14 Oct 2008 17:46:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LPI]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=101</guid>
		<description><![CDATA[While wondering how to direct output to my console I come upon a funny thing. Under Ubuntu 8.04.1 try sudo cat /dev/console and just watch (if you can)  I know it is stupid but this is just another outdated thing which is questioned in the current LPI exam  
Anyway, according to some sources [...]]]></description>
			<content:encoded><![CDATA[<p>While wondering how to direct output to my console I come upon a funny thing. Under Ubuntu 8.04.1 try sudo cat /dev/console and just watch (if you can) <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I know it is stupid but this is just another outdated thing which is questioned in the current LPI exam <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway, according to <em>some </em>sources output directed to /dev/console should be shown on the xconsole session <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> This should be especially useful when debugging applications. Presumably, if you know the facility and the priority of the debugging messages, you could direct them through syslog to the console.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/having-fun-with-devconsole.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>LPIC-1 (LPI 102) Syslog Cheatsheet</title>
		<link>http://linux.bgsnow.com/lpic-1-lpi-102-syslog-cheatsheet.php</link>
		<comments>http://linux.bgsnow.com/lpic-1-lpi-102-syslog-cheatsheet.php#comments</comments>
		<pubDate>Sun, 12 Oct 2008 19:56:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LPI]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=88</guid>
		<description><![CDATA[It is very probable that each LPIC-1 102 exam contains a twisted question about the neglected syslog.
Here are some configuration options taken from 'man syslog' to get us pass through:
mail.*;mail.!=info       /var/log/mail - this means that all messages from the mail facility with any priority but 'info' will be logged in the file /var/log/mail
news.info;news.!crit     /var/log/news - [...]]]></description>
			<content:encoded><![CDATA[<p>It is very probable that each LPIC-1 102 exam contains a twisted question about the neglected syslog.</p>
<p>Here are some configuration options taken from 'man syslog' to get us pass through:</p>
<p><em>mail.*;mail.!=info       /var/log/mail</em> - this means that all messages from the mail facility with any priority but 'info' will be logged in the file <em>/var/log/mail</em></p>
<p><em>news.info;news.!crit     /var/log/news</em> - all messages from news.info (including) to  news.crit  (excluding)  would be logged to the <em>/var/log/news</em> file.</p>
<p><em>mail.!debug</em> - putting only this on a line means to skipp all mail messages but the ones for debugging</p>
<p><em>*.*            @example.org </em>- this means to redirect all messages to example.org</p>
<p><em>kern.=debug              |/usr/adm/debug </em>- route only kernel debugging messages to the debug pipe</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/lpic-1-lpi-102-syslog-cheatsheet.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>LPIC-1 102 Documentation Cheatsheet</title>
		<link>http://linux.bgsnow.com/lpi-1-102-documentation-cheatsheet.php</link>
		<comments>http://linux.bgsnow.com/lpi-1-102-documentation-cheatsheet.php#comments</comments>
		<pubDate>Sun, 12 Oct 2008 09:24:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LPI]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=75</guid>
		<description><![CDATA[man -aw [subject] - shows the files corresponding to all entries for a subject.
man -k = apropos - searchs name and detail description
man -f = whatis - searches one line summaries
Man sections
1   Executable programs or shell commands
2   System calls (functions provided by the kernel)
3   Library calls (functions within program libraries)
4   Special files (usually found in [...]]]></description>
			<content:encoded><![CDATA[<p><strong>man -aw [subject]</strong> - shows the files corresponding to all entries for a subject.<br />
<strong>man -k = apropos </strong>- searchs name and detail description<br />
<strong>man -f = whatis</strong> - searches one line summaries</p>
<p>Man sections<br />
1   Executable programs or shell commands<br />
2   System calls (functions provided by the kernel)<br />
3   Library calls (functions within program libraries)<br />
4   Special files (usually found in /dev)<br />
5   File formats and conventions eg /etc/passwd<br />
6   Games<br />
7   Miscellaneous (including macro  packages  and  conventions), e.g. man(7), groff(7)<br />
8   System administration commands (usually only for root)</p>
<p>Man searches the $MANPATH for its entries. Usually these entries are stored in gz format in /usr/man/ (or /usr/share/man/). Uses the $PAGER variable to present the output.</p>
<p><strong>/etc/issue</strong> - shows text on console when you log in locally<br />
<strong>/etc/issue.net</strong> - shows text on console when you log in remotely<br />
<strong>/etc/motd</strong> - moto of the day - displays on all logins</p>
<p>You can search for help online (stupid):</p>
<p>- The linux documentation project<br />
- Online guides<br />
- Vendor sites<br />
- Mailing lists</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/lpi-1-102-documentation-cheatsheet.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>LPIC-1 102 Printing Cheatsheet</title>
		<link>http://linux.bgsnow.com/lpic-1-102-printing-cheatsheet.php</link>
		<comments>http://linux.bgsnow.com/lpic-1-102-printing-cheatsheet.php#comments</comments>
		<pubDate>Sun, 12 Oct 2008 07:47:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LPI]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=66</guid>
		<description><![CDATA[One of the most unpleasant topics in LPIC-1 (LPI 102) is the one about printing. That's why I have prepared the following must-know cheatsheet about the exam.
/etc/printcap - the file which describes the available printers and their options. Used by the main spooling daemon. Important options:
if=input_filter
lp=printer_device
lf=log_file
mx=max_size
sd=spool_directory
/var/spool/lpd/lpi - the spooling directory for a sample printer called [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most unpleasant topics in LPIC-1 (LPI 102) is the one about printing. That's why I have prepared the following must-know cheatsheet about the exam.</p>
<p><em>/etc/printcap</em> - the file which describes the available printers and their options. Used by the main spooling daemon. Important options:</p>
<p>if=input_filter<br />
lp=printer_device<br />
lf=log_file<br />
mx=max_size<br />
sd=spool_directory</p>
<p><em>/var/spool/lpd/lpi</em> - the spooling directory for a sample printer called 'lpi'. It contains all the queued print jobs and control files for the lpi printer.</p>
<p><strong>lpq [Options] [Users] [job id]</strong></p>
<p># lpq -Plpi - show the queued jobs for the lpi printer</p>
<p><strong>lprm [-Pprinter name] [users] [job id] </strong>- remove printer jobs</p>
<p><strong>lpc [command] [printer name] [job id]</strong> - printing control</p>
<p># lpc help<br />
Commands may be abbreviated.  Commands are:<br />
abort   enable  disable help    restart status  topq    ?<br />
clean   exit    down    quit    start   stop    up</p>
<p># lpc topq lpi 102 - move print job 102 to the top of the queue for the lpi printer</p>
<p># lpc disable lpi - disallow new jobs to be queued for the lpi printer. Allow the ones already queued to be completed.</p>
<p>Here is the ultimate printing command <strong>'lpr -Plpi -J "LPI test print" -#2 -m -p -q -r lpi.txt</strong>' - this means to use the printer lpi, to name the job "LPI test print", to make 2 copies of it, send mail upon completion, to make it in Pretty format, to queue it for later and finali to remove the file when done.</p>
<p>lpstat -s = lpstat -d -c -v - Display default printer, all available printers and classes</p>
<p>lpstat -p = lpc status - check printers' statuses</p>
<p>Use <strong>cupsenable</strong> and <strong>cupsdisable</strong> to enable and disable a printer.</p>
<p># lp -i 16 -n 5 - change the number of copies to 5 for job id 16</p>
<p>Filters are used to convert generic data to printable data:<br />
<strong>Raw data -&gt; Post Script (PDL format) -&gt; Ghost Script (Printer specific data) -&gt; Printer</strong></p>
<p>To use a Samba printer you need to:<br />
1. use smbprint input filter<br />
2. Have a .config file with in the spool directory defining server, service and password.</p>
<p><strong>CUPS uses MIME types to determine the correct filter for a file.</strong></p>
<p>lpadmin -x [printer name / printer class] - deletes a printer / class.</p>
<p>A <strong>printer class</strong> is responsible for properly distributing the jobs to a group of printers.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/lpic-1-102-printing-cheatsheet.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>More LPI 102 Stuff</title>
		<link>http://linux.bgsnow.com/more-lpi-stuff.php</link>
		<comments>http://linux.bgsnow.com/more-lpi-stuff.php#comments</comments>
		<pubDate>Mon, 06 Oct 2008 18:48:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[LPI]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=39</guid>
		<description><![CDATA[While making tests from http://www.penguintutor.com/cgi-bin/quiz/index.pl?&#38;style=default (an excellent resource for preparing for the exam) I have come upon a few mistakes. Here is one of them:
---------------------------------------------------------------------------------------

Name: passer        Question: 21 / 25
Ref No: linuxquiz_0047

Which line below could be a valid line in the /etc/group file? The users: john, stewart and fred should all be members of [...]]]></description>
			<content:encoded><![CDATA[<p>While making tests from http://www.penguintutor.com/cgi-bin/quiz/index.pl?&amp;style=default (an excellent resource for preparing for the exam) I have come upon a few mistakes. Here is one of them:</p>
<p>---------------------------------------------------------------------------------------</p>
<div id="stats">
<p>Name: passer        Question: 21 / 25</p></div>
<h3>Ref No: linuxquiz_0047</h3>
<div id="question">
<p>Which line below could be a valid line in the /etc/group file? The users: john, stewart and fred should all be members of the finance group. Select the most appropriate answer.</p>
<form action="score.pl">
<input name="style" type="hidden" value="default" />
<input name="answer" type="radio" value="0" /> finance:x:503:john,stewart,fred</p>
<input name="answer" type="radio" value="1" /> 503:finance:x:john,stewart,fred</p>
<input name="answer" type="radio" value="2" /> finance:503:x:john,stewart,fred</p>
<input name="answer" type="radio" value="3" /> john,stewart,fred:finance:x:503</p>
</form>
<p><br class="clearboth" /></div>
<div id="answer">
<p><span class="reviewwrong">Incorrect</span></p>
<p>Your answer:</p>
<p>finance:x:503:john,stewart,fred</p>
<p>Correct answer:</p>
<p>The correct answer is <strong>finance:503:x:john¸stewart¸fred</strong>.</p>
<p><strong>Well, this is obviously wrong <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> My answer is the correct one <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong>Here is a great reference from one of my favorite Linux sites:</p>
<p>http://www.cyberciti.biz/faq/understanding-etcgroup-file/</p>
<p>---------------------------------------------------------------------------------------</p></div>
<div>
<p>You might also wonder what means '<strong>quaded decimal netmask in CIDR notation</strong>'. If you just take a look at 192.168.0.22<strong>/24, </strong>it is what /24 stands for <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <strong>Subnetting</strong> is more likely the term you are acquainted with and you could easily recall the basic rules from the following chart taken from Wikipedia:</p>
<div class="wp-caption alignnone" style="width: 549px"><img title="Subnetting" src="http://upload.wikimedia.org/wikipedia/en/6/6e/Subnetting.png" alt="Subnetting" width="539" height="220" /><p class="wp-caption-text">Subnetting</p></div>
<p>---------------------------------------------------------------------------------------</p>
<div>
<p>Another thing that really bothers me is that there is no 'breakfast' time for the 'at' command while there is 'teatime'. This command does take some funky input <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>---------------------------------------------------------------------------------------<br />
Also, there is one less popular file called /etc/sysconfig/network. I just wonder how could I have missed it until now <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I guess that's one thing 'setup' changes automatically for you:</p>
<p>NETWORKING=yes<br />
FORWARD_IPV4=yes<br />
HOSTNAME=linux.bgsnow.com<br />
GATEWAY=192.168.0.1<br />
GATEWAYDEV= eth3</p>
<p>---------------------------------------------------------------------------------------</p>
<p>Playing with <strong>logger</strong> <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> This is another simple program which logs messages to the default syslog file. For example, on my box:</p>
<p>terry@:~$ logger<br />
zaaeeeebi<br />
i am the biggest hacker in the world <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>terry@:~$</p>
<p><em>on my other console:</em></p>
<p>terry@:~$ tail -f /var/log/messages<br />
Oct  6 19:39:41 a2 -- MARK --<br />
Oct  6 19:45:16 a2 kernel: [ 5171.047451] gnome-screensav[593]: segfault at 00000200 eip b7f4cb9d esp bfe87d90 error 4<br />
Oct  6 19:59:41 a2 -- MARK --<br />
Oct  6 20:19:41 a2 -- MARK --<br />
Oct  6 20:39:41 a2 -- MARK --<br />
Oct  6 20:59:41 a2 -- MARK --<br />
Oct  6 21:19:41 a2 -- MARK --<br />
Oct  6 21:39:41 a2 -- MARK --<br />
Oct  6 21:59:41 a2 -- MARK --<br />
Oct  6 22:17:16 a2 terry: asdasd<br />
Oct  6 22:18:11 a2 terry: zaaeeeebi<br />
Oct  6 22:18:20 a2 terry: i am the biggest hacker in the world <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Oct  6 22:18:20 a2 terry:</p>
<p>terry@:~$</p>
<p>Probably logger is not the command you are going to use every day but it seems to be quite popular for the LPI 102 exam. Googling for it will render endless number of irrelevant results so you better check its man page.</p>
<p>---------------------------------------------------------------------------------------</p>
<p>Freaking admins with <strong>shutdown -k</strong></p>
<p>I guess the inventor of shutdown has a good sense of humor and wants to provide an easy way for the community to freak admins by sending bogus shutdown messages <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> When you have a new admin, make sure he / she is logged on a system and issue:</p>
<p>root@a2:/home/terry# shutdown -k 1 u suck and i 0wn u, little tward. everything is deleted and shutting down!</p>
<p>Broadcast message from terry@a2<br />
(/dev/pts/1) at 22:43 ...</p>
<p>The system is going down for maintenance IN ONE MINUTE!<br />
u suck and i 0wn u, little tward. system is deleted and shutting down!<br />
root@a2:/home/terry#</p>
<p>This is the so called psychological training for new guys to get used to the rough reality <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> It may also help you pass the LPI exam and answer the twisted questions about the shutdown command :)))</div>
<p>---------------------------------------------------------------------------------------</p>
<p>Now another funny thing - the well know <strong>init</strong> command has an option to reload its configuration (don't tell me you haven't reloaded the init configuration without rebouting). It is taken again from PenguinTutor:</p>
<h3>Ref No: linuxquiz_0028</h3>
<div id="question">
<p>What command is used to reload the /etc/inittab file after it has been updated? Choose the most appropriate answer:</p>
<form action="score.pl">
<input name="style" type="hidden" value="default" />
<input name="answer" type="radio" value="0" /> /sbin/init q</p>
<input name="answer" type="radio" value="1" /> /sbin/init r</p>
<input name="answer" type="radio" value="2" /> /sbin/init s</p>
<input name="answer" type="radio" value="3" /> /sbin/init 6<br />
</form>
<p> <br class="clearboth" /></div>
<div id="answer">
<p><span class="reviewnotanswered">Not Answered</span></p>
<p>Your answer:</p>
<p>No answer</p>
<p>Correct answer:</p>
<p>The correct command is <strong>/sbin/init q</strong>. The r option is not a valid option for the init command. The s option will change to single user mode, and the 6 option will reboot the system. The option q is the most appropriate as it reloads the configuration file without rebooting the server.</div>
<p>One thing is that according to the only documentation I find 'q' is for quite, suppressing the errors...</p>
<p><em>oot@a2:/home/terry# init --help<br />
Usage: init [OPTION]...<br />
Process management daemon.</p>
<p>Options:<br />
-q, --quiet                 reduce output to errors only<br />
-v, --verbose               increase output to include informational messages<br />
--help                  display this help and exit<br />
--version               output version information and exit</p>
<p>This daemon is normally executed by the kernel and given process id 1 to denote its special status.  When executed by a user process, it will actually run<br />
/sbin/telinit.</p>
<p>Report bugs to &lt;upstart-devel@lists.ubuntu.com&gt;</em></p>
<p>Another funny thing is that there are many other undocumented options such as:</p>
<p>root@a2:/home/terry# init a<br />
root@a2:/home/terry# init b<br />
root@a2:/home/terry# init c<br />
root@a2:/home/terry# init d<br />
init: illegal runlevel: d<br />
Try `init --help' for more information.</p>
<p>If you guessed that a, b and c (just like q) did nothing, you guessed it right <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I hope there is no such a stupid question on the exam <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>---------------------------------------------------------------------------------------</p></div>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/more-lpi-stuff.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>Calculating total file size with awk</title>
		<link>http://linux.bgsnow.com/calculating-total-file-sizes-with-awk.php</link>
		<comments>http://linux.bgsnow.com/calculating-total-file-sizes-with-awk.php#comments</comments>
		<pubDate>Thu, 02 Oct 2008 12:00:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=33</guid>
		<description><![CDATA[Imagine you want to calculate the total size for all of your doc files. Here is a simple way to do it:
find -name '*.doc' -exec ls -al {} \; &#124;awk '{SUM += $5} END {print SUM}'
What it does is find all the doc files, then pass them to the ls -al command through the exec [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine you want to calculate the total size for all of your doc files. Here is a simple way to do it:</p>
<p>find -name '*.doc' -exec ls -al {} \; |awk '{SUM += $5} END {print SUM}'</p>
<p>What it does is find all the doc files, then pass them to the ls -al command through the exec option. Lastly awk takes the 5 column (the column for the file sizes), adds all the values and prints the result.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/calculating-total-file-sizes-with-awk.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>Performing a Linux security check for SUID files</title>
		<link>http://linux.bgsnow.com/performing-a-linux-security-check-for-suid-files.php</link>
		<comments>http://linux.bgsnow.com/performing-a-linux-security-check-for-suid-files.php#comments</comments>
		<pubDate>Sat, 13 Sep 2008 07:20:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=21</guid>
		<description><![CDATA[For this purpose you can set a simple cron as the following:
find / -user root -perm -4000 -print &#124; mail -s 'Files that have SUID root' yourmail@example.org
The above cron is also a good and simple example how you can mail yourself regularly important information.
]]></description>
			<content:encoded><![CDATA[<p>For this purpose you can set a simple cron as the following:</p>
<p>find / -user root -perm -4000 -print | mail -s 'Files that have SUID root' yourmail@example.org</p>
<p>The above cron is also a good and simple example how you can mail yourself regularly important information.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/performing-a-linux-security-check-for-suid-files.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>cPanel mailbox to maildir problems</title>
		<link>http://linux.bgsnow.com/cpanel-mailbox-to-maildir-problems.php</link>
		<comments>http://linux.bgsnow.com/cpanel-mailbox-to-maildir-problems.php#comments</comments>
		<pubDate>Mon, 28 Jul 2008 14:19:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Others]]></category>

		<category><![CDATA[linux cpanel courier maildir mailbox exim]]></category>

		<guid isPermaLink="false">http://linux.bgsnow.com/?p=19</guid>
		<description><![CDATA[Sometimes after cPanel's maildir conversion (/scripts/convert2maildir) there might be missing mails. In my case the mails from the Sent folder were missing.
Despite all of my efforts to re-run /scripts/convert2maildir with option 3 (Convert partially converted mail accounts), there was still a huge mailbox file for the Sent folder in the user's account (/home/user/mail/bgsnow.com/problem_user/Sent). Of course, [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes after cPanel's maildir conversion (/scripts/convert2maildir) there might be missing mails. In my case the mails from the Sent folder were missing.</p>
<p>Despite all of my efforts to re-run /scripts/convert2maildir with option 3 (Convert partially converted mail accounts), there was still a huge mailbox file for the Sent folder in the user's account (/home/user/mail/bgsnow.com/problem_user/Sent). Of course, the maildir folder .Sent (/home/user/mail/bgsnow.com/problem_user/.Sent/) did not have any of the mails from the Sent mailbox file.</p>
<p>After googling for some time and trying third party scripts to no avail, I have turned to a simple solution. I have created a directory /home/user/mail/bgsnow.com/test/. This should represent the mail directory for a fake email account test@bgsnow.com. Then I have copied the Sent file from the user which has problems (/home/user/mail/bgsnow.com/problem_user/Sent) to this directory and re-run /scripts/convert2maildir. This created the needed maildir directory .Sent (/home/user/mail/bgsnow.com/test/.Sent)  which I copied directly to the mail directory for the user with problems (/home/user/mail/bgsnow.com/problem_user/).</p>
<p>This fixed the problem for me <img src='http://linux.bgsnow.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://linux.bgsnow.com/cpanel-mailbox-to-maildir-problems.php/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
