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

<channel>
	<title>Parolski.com &#187; man page</title>
	<atom:link href="http://www.parolski.com/tag/man-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.parolski.com</link>
	<description>Faith, Solaris, and Chicken Korma, by Anton Parol</description>
	<lastBuildDate>Fri, 14 Oct 2011 11:16:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Indexing your man pages</title>
		<link>http://www.parolski.com/2009/09/24/indexing-your-man-pages/</link>
		<comments>http://www.parolski.com/2009/09/24/indexing-your-man-pages/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 17:49:48 +0000</pubDate>
		<dc:creator>Anton Parol</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[catman]]></category>
		<category><![CDATA[man page]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[windex]]></category>

		<guid isPermaLink="false">http://www.parolski.com/?p=257</guid>
		<description><![CDATA[Its not as boring as you think, but you&#8217;ll HAVE to do it when you don&#8217;t have a windex file and want to search using man -k : anton@opensolaris:/$ man -k grub /usr/share/man/windex: No such file or directory To get round this, we simply go ahead and create the index with catman: anton@opensolaris:/$ pfexec time [...]]]></description>
			<content:encoded><![CDATA[<p>Its not as boring as you think, but you&#8217;ll HAVE to do it when you don&#8217;t have a windex file and want to search using man -k :</p>
<blockquote><p>anton@opensolaris:/$ man -k grub<br />
/usr/share/man/windex: No such file or directory</p></blockquote>
<p>To get round this, we simply go ahead and create the index with <a href="http://docs.sun.com/app/docs/doc/801-6680-1M/6i11qf4sq?a=view&amp;q=catman">catman</a>:</p>
<blockquote><p>anton@opensolaris:/$ pfexec time catman -w</p>
<p>real        2.9<br />
user        1.8<br />
sys         0.1</p></blockquote>
<p>Its pretty quick, and you get left with a little index in /usr/share/man/windex. Its just an ascii version of all the names of your manpages, plus a one line summary of what each one does:</p>
<blockquote><p>1        1 (3openssl)    - OpenSSL configuration functions<br />
1        1 (3openssl)    - OpenSSL configuration functions<br />
1394        ieee1394 (7d)    - Solaris IEEE-1394 Architecture<br />
2        2 (3openssl)    - \&amp; OpenSSL configuration cleanup functions<br />
2        2 (3openssl)    - \&amp; OpenSSL configuration cleanup functions<br />
2        2 (3openssl)    - \&amp; OpenSSL configuration cleanup functions<br />
2.1        EasyTAG (1)    - Tag editor for MP3 and Ogg Vorbis files<br />
2_F32_Sat    mlib_SignalConvertShift_U8_S8_Sat (3mlib)   &#8211; data type convert<br />
with shifting<br />
5.0        MySQL (1)    - MySQL RDBMS version 5.0 for Solaris<br />
6to4        tun (7m)    - tunneling STREAMS module<br />
6to4relay    6to4relay (1m)    - administer configuration for 6to4 relay router<br />
communication<br />
6to4tun     tun (7m)    - tunneling STREAMS module<br />
7-Zip        7-Zip (1)    - A file archiver with highest compression ratio</p></blockquote>
<p>So now when you do your man -k , you&#8217;ll get something useful!:</p>
<blockquote><p>anton@opensolaris:/$ man -k grub<br />
bootadm     bootadm (1m)    - manage bootability of GRUB-enabled operating system<br />
grub        grub (5)    - GRand Unified Bootloader software on Solaris<br />
installgrub    installgrub (1m)    &#8211; install GRUB in a disk partition or a floppy</p></blockquote>
<p>Crucially you only want to do catman -w , otherwise you&#8217;ll be reformatting all your manpages!</p>
<p>From the man page of <a href="http://docs.sun.com/app/docs/doc/801-6680-1M/6i11qf4sq?a=view&amp;q=catman">catman</a>:</p>
<blockquote><p>-w                  Only create the windex database that  is<br />
used  by whatis(1) and the man(1) -f and<br />
-k options.  No manual  reformatting  is<br />
done.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.parolski.com/2009/09/24/indexing-your-man-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cd needs execute permissions to work?!</title>
		<link>http://www.parolski.com/2008/03/09/cd-needs-execute-permissions-to-work/</link>
		<comments>http://www.parolski.com/2008/03/09/cd-needs-execute-permissions-to-work/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 01:41:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[chdir())]]></category>
		<category><![CDATA[EACCES]]></category>
		<category><![CDATA[man page]]></category>
		<category><![CDATA[stat()]]></category>

		<guid isPermaLink="false">http://www.parolski.com/2008/03/09/cd-needs-execute-permissions-to-work/</guid>
		<description><![CDATA[You need execute permission on a directory to cd to it! Is read not enough? In practice, no. The chdir system call requires execute permission to make that directory the starting point for path searches. According to the chdir (system call, section 2) man page: For a directory to become the current directory, a process [...]]]></description>
			<content:encoded><![CDATA[<p>You need execute permission on a directory to<code> cd </code>to it!  Is read not enough? In practice, no. The <code>chdir </code>system call requires execute permission to make that directory the starting point for path searches. According to the <code>chdir</code> (system call, section 2) man page:<br />
<code><br />
For a directory to become the current directory,  a  process<br />
must have execute (search) access to the directory.</code></p>
<p>So when trussing the output of a failed <code>cd </code>to a directory with no execute permissions we see:</p>
<p><code>chdir("lala")                                   Err#13 EACCES [file_dac_search]<br />
chdir("lala")                                   Err#13 EACCES [file_dac_search]</code></p>
<p>and as the man page goes on to say:<br />
<code><br />
EACCES          Search permission is  denied  for  any  com-<br />
ponent of the path name.</code></p>
<p>Reading <a href="http://www.hccfl.edu/pollock/AUnix1/FilePermissions.htm">this article</a> explains, that of course you can&#8217;t execute a directory but rather, that the execute permission bit is reused for different purposes. Without execute permission on the directory, you can&#8217;t  <code>stat()</code> any files within the directory. Opening, deleting and other operations on a file first require you to<code> stat()</code> it first, as <code>stat()</code> gives you the files inode. Without the files inode, theres very little you can do with it!</p>
<p>Armed with this knowledge you might feel inspired to check out the <a href="http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/syscall/chdir.c">source code</a> of this call for yourself!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.parolski.com/2008/03/09/cd-needs-execute-permissions-to-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

