<?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>AIX Commands, Tools, Scripts and Explanations &#187; AIX Commands</title>
	<atom:link href="http://icancompute.ca/aix/category/commands/feed/" rel="self" type="application/rss+xml" />
	<link>http://icancompute.ca/aix</link>
	<description>Everything I have learnt and used while being an AIX systems adminstrator.  Custom scripts, commands and projects used to maintain a virtualized AIX server environment</description>
	<lastBuildDate>Tue, 05 Jun 2012 19:25:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>VIO and HMC Levels</title>
		<link>http://icancompute.ca/aix/commands/vio-hmc-levels/</link>
		<comments>http://icancompute.ca/aix/commands/vio-hmc-levels/#comments</comments>
		<pubDate>Tue, 05 Jun 2012 19:25:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[HMC]]></category>
		<category><![CDATA[ioslevel]]></category>
		<category><![CDATA[level]]></category>
		<category><![CDATA[lshmc]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[VIO]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=439</guid>
		<description><![CDATA[It is important to maintain proper levels of your VIO (Virtual I/O) servers and HMC (Hardware Management Console).  IBM is constantly providing fixes and updates, and it is integral that you keep a keen eye on these levels when implementing new technology or you are experiencing issues with new applications or practices. &#160; VIO: ioslevel [...]]]></description>
				<content:encoded><![CDATA[<p>It is important to maintain proper levels of your VIO (Virtual I/O) servers and HMC (Hardware Management Console).  IBM is constantly providing fixes and updates, and it is integral that you keep a keen eye on these levels when implementing new technology or you are experiencing issues with new applications or practices.</p>
<p>&nbsp;</p>
<p>VIO:</p>
<p>ioslevel &#8211;&gt; VIO version</p>
<p>oem_platform_level &#8211;&gt; AIX version of VIO server</p>
<p>&nbsp;</p>
<p>HMC:</p>
<p>lshmc -V &#8211;&gt; list the version of your HMC</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/vio-hmc-levels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit /etc/inittab</title>
		<link>http://icancompute.ca/aix/commands/edit-etcinittab-aix-commands/</link>
		<comments>http://icancompute.ca/aix/commands/edit-etcinittab-aix-commands/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 17:57:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[chitab]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[inittab]]></category>
		<category><![CDATA[lsitab]]></category>
		<category><![CDATA[mkitab]]></category>
		<category><![CDATA[rmitab]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=380</guid>
		<description><![CDATA[vi /etc/inittab = BAD IDEA We all know that vi (or any other text editor) can easily edit a text file such as the inittab.  We also know that nobody is perfect, and that mistakes do happen (escape characters, wrong formatting etc.)  The problem is, when editing the inittab, if you make an error in the wrong [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.sdsc.edu/~sherwint/AIXWeb/AIX/AIX4_hints.html">v</a>i /etc/inittab = BAD IDEA</p>
<p>We all know that vi (or any other text editor) can easily edit a text file such as the inittab.  We also know that <strong>nobody is perfect</strong>, and that mistakes do happen (escape characters, wrong formatting etc.)  The problem is, <strong>when editing the inittab</strong>, if you make an <strong>error in the wrong place</strong>, you can render the system <strong>unbootable</strong>.  This is because the inittab is an important part of the boot sequence for an lpar, and once the boot sequence get mucked up, bad things start to happen.</p>
<p>This guide will go over the <strong>correct</strong> ways to edit the inittab without the risk of breaking the lpar altogether. (The only way to recover from some inittab errors are to network boot and fix from there&#8230;)</p>
<p>lsitab -a -&gt; list contents of the inittab</p>
<p>lsitab <em>identifier</em> -&gt; find specified identifier in inittab and display entry</p>
<p>chitab i<em>dentifier:run_level:action:command</em> -&gt; change the run level, action and command of the specified identifier</p>
<p>mkitab i<em>dentifier:run_level:action:command </em>-&gt; create new entry in the inittab</p>
<p>mkitab -i <em>search_term </em>i<em>dentifier:run_level:action:command </em>-&gt; create new entry in the inittab after specified identifier</p>
<p>rmitab <em>identifier</em> -&gt; remove specified entry from the inittab</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/edit-etcinittab-aix-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AWK vs CUT</title>
		<link>http://icancompute.ca/aix/commands/awk-cut/</link>
		<comments>http://icancompute.ca/aix/commands/awk-cut/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 21:00:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[cut]]></category>
		<category><![CDATA[delimiter]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=397</guid>
		<description><![CDATA[Well, not really.  But I assume I&#8217;ll get lots of attention with that name alone.  When I thought about writing this it was for one very specific thing only. Often times in a script I&#8217;ll want to strip output based on a delimiter or columns.  I found myself constantly fighting with IFS and trying to [...]]]></description>
				<content:encoded><![CDATA[<p>Well, not really.  But I assume I&#8217;ll get lots of attention with that name alone.  When I thought about writing this it was for one very specific thing only.</p>
<p>Often times in a script I&#8217;ll want to strip output based on a delimiter or columns.  I found myself constantly fighting with IFS and trying to make sense of delimiters that don&#8217;t follow a common pattern.  My two ways of extracting columns from a file/variable are as follows:</p>
<p>&nbsp;</p>
<p>echo $variable | cut -f 2 -d &#8220;:&#8221; &#8211;&gt; (-f to select column, -d to select delimiter)</p>
<p>echo $variable | awk &#8216;{ print $2 }&#8217;</p>
<p>Believe it or not, for someone that started off with no formal shell training or anything, this took me awhile to figure out.  Cut has its ups and downs but I will say this, awk is without a doubt worth learning.  In its entirety.</p>
<p>Anyways, this was just a quick update on how to extract columns from data using cut and awk</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/awk-cut/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>set -o vi</title>
		<link>http://icancompute.ca/aix/commands/set-vi-command-line-history/</link>
		<comments>http://icancompute.ca/aix/commands/set-vi-command-line-history/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 19:18:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[file name completion]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[set -o vi]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=370</guid>
		<description><![CDATA[If you moved to AIX from Linux, like I did, the one thing you will miss with KSH is the command recall and auto-complete that BASH offered.  Well you needn&#8217;t worry because KSH has these capabilities, you just have to spend some time familiarising yourself with the new techniques. This tutorial will be heavily related [...]]]></description>
				<content:encoded><![CDATA[<p>If you moved to AIX from Linux, like I did, the one thing you will miss with KSH is the command recall and auto-complete that BASH offered.  Well you needn&#8217;t worry because KSH has these capabilities, you just have to spend some time familiarising yourself with the new techniques.</p>
<p>This tutorial will be heavily related the the <a title="Basics of Text Editing in Unix with Vi" href="http://icancompute.ca/aix/config/software/basics-of-test-editing-in-unix-with-vi/">Vi Tutorial</a>.  I suggest if you need more help or explanations with this, please visit that post for further explanation.</p>
<p>&nbsp;</p>
<p>When using KSH, you can select the default history editor type.  To do this we use the &#8220;set -o&#8221; command.</p>
<p>$ set -o vi -&gt; use vi as your command history editor</p>
<p>$ set -o emacs -&gt; use emacs as your command history editor</p>
<p>$ set -o gmacs -&gt; use gmacs as your command history editor</p>
<p>This will in turn allow you to use vi to edit the line that you are currently typing.  This will help for command history recall and editing and reissuing commands with errors etc.</p>
<p>Once you have issue the &#8220;set -o vi&#8221; command, you will use basic vi techniques to navigate and edit your history:</p>
<p>&lt;esc&gt; + k -&gt; This will bring up your most recent command, and initiate the history recall session.  From now on you will be using vi on your current line</p>
<p>k -&gt; up</p>
<p>j -&gt; down</p>
<p>h -&gt; left</p>
<p>l -&gt; right</p>
<p>x -&gt; delete char</p>
<p>A -&gt; append to line</p>
<p>i -&gt; switch to insert mode</p>
<p>&nbsp;</p>
<p>These are simply a handful of commands you can issue to edit and view your history.  Again, recall the two posts (<a title="Basics of Text Editing in Unix with Vi" href="http://icancompute.ca/aix/config/software/basics-of-test-editing-in-unix-with-vi/">Vi Intro</a> and <a title="Using vi | AIX Certification" href="http://icancompute.ca/aix/cert/vi/">Vi for Certification</a>)</p>
<p>&nbsp;</p>
<p>&lt;esc&gt;+&#8217;=&#8217; -&gt; This command will give you a list of possible files/directories that exist based on your input.  For instance, if you are in a directory with &#8220;text.txt, terminal.out, erlog.out&#8221; and you issue &#8220;$ ls te&lt;esc&gt;+&#8217;='&#8221;, you will get:</p>
<p>1)  terminal.out</p>
<p>2) text.txt</p>
<p>&lt;esc&gt;+\ -&gt; This command will complete the file name as far as it can, similar to file name completion in BASH using &lt;Tab&gt;.</p>
<p>&nbsp;</p>
<p>I hope this quick tutorial on command history recall and editing has helped you.  Remember you can add &#8220;set -o vi&#8221; to your profile to ensure it is set every time you log onto the lpar.</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/set-vi-command-line-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quotation Marks</title>
		<link>http://icancompute.ca/aix/commands/quotation-mark-meta-characters-maintaining-data-integrity/</link>
		<comments>http://icancompute.ca/aix/commands/quotation-mark-meta-characters-maintaining-data-integrity/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 19:04:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[backtick]]></category>
		<category><![CDATA[quotation]]></category>
		<category><![CDATA[quote]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=367</guid>
		<description><![CDATA[In shell scripting, you may run into a constant battle with quotation marks.  Seems silly, but between the three types (double quotes-&#8221;, single quotes-&#8217;, backticks-`), I have run into numerous problems that perhaps I can save you from. First off, when copying any scripts, commands or data from the internet, if you run into any [...]]]></description>
				<content:encoded><![CDATA[<p>In shell scripting, you may run into a constant battle with quotation marks.  Seems silly, but between the three types (double quotes-&#8221;, single quotes-&#8217;, backticks-`), I have run into numerous problems that perhaps I can save you from.<br />
First off, when <strong>copying any scripts, commands or data from the internet</strong>, if you run into any problems with code that is said to be tested, check the quotation marks.  Often times browsers, web themes or even copying and pasting can result into a mish-mash of punctuation changes.</p>
<p>Secondly, when <strong>nesting quotes</strong> in a script or command, be sure you a) alternate quotation styles when nesting and b) ensure your order of end-quoting matches.</p>
<p>A quick overview of meta characters is below.</p>
<p>Remember, anything in <strong>double quotes</strong> may be read by the shell interpreter and therefore any meta characters <strong>need to be escaped</strong> if you want them to take the literal meaning.</p>
<p><strong>Single quotes and backticks</strong> take the <strong>literal meaning</strong> of characters</p>
<p><a title="IBM" href="http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.baseadmn%2Fdoc%2Fbaseadmndita%2Fkorn_shell_quote_chars.htm" target="_blank">Here</a> is IBM&#8217;s take on the matter</p>
<p><strong>Meta Characters</strong></p>
<ul>
<li>pipe (<br />
<samp>|</samp>
<p>)</li>
<li>ampersand (<br />
<samp>&amp;</samp>
<p>)</li>
<li>semicolon (<br />
<samp>;</samp>
<p>)</li>
<li>less-than sign (<br />
<samp>&lt;</samp>
<p>) and greater-than sign (<br />
<samp>&gt;</samp>
<p>)</li>
<li>left parenthesis (<br />
<samp>(</samp>
<p>) and right parenthesis (<br />
<samp>)</samp>
<p>)</li>
<li>dollar sign (<br />
<samp>$</samp>
<p>)</li>
<li>backquote (<br />
<samp>`</samp>
<p>) and single quotation mark (<br />
<samp>&#8216;</samp>
<p>)</li>
<li>backslash (<br />
<samp>\</samp>
<p>)</li>
<li>double-quotation marks (<br />
<samp>&#8220;</samp>
<p>)</li>
<li>newline character</li>
<li>space character</li>
<li>tab character</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/quotation-mark-meta-characters-maintaining-data-integrity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Korn Shell (KSH) Command &#124; if Test Parameters</title>
		<link>http://icancompute.ca/aix/commands/korn-shell-ksh-command-test-parameters/</link>
		<comments>http://icancompute.ca/aix/commands/korn-shell-ksh-command-test-parameters/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 15:13:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[korn shell]]></category>
		<category><![CDATA[ksh]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=257</guid>
		<description><![CDATA[if/Test Statement test -e file [ -e file ] [[ -e file ]] x=2 test $x -eq 1 [ $x -eq 2 ] [[ $x -eq 3 ]] File Test Operators File status can be examined using several operators. Parameter:     Meaning -s file     size greater than zero -r file      exists and [...]]]></description>
				<content:encoded><![CDATA[<h3>if/Test Statement</h3>
<p>test -e file<br />
[ -e file ]<br />
[[ -e file ]]</p>
<p>x=2<br />
test $x -eq 1<br />
[ $x -eq 2 ]<br />
[[ $x -eq 3 ]]</p>
<h3>File Test Operators</h3>
<p>File status can be examined using several operators.</p>
<p><strong>Parameter</strong>:     Meaning<br />
<strong>-s file</strong>     size greater than zero<br />
<strong>-r file</strong>      exists and is readable<br />
<strong>-w file     </strong> exists and is writable<br />
<strong>-x file</strong>      exists and is executable<br />
<strong>-u file     </strong> exists and has the SUID bit set<br />
<strong>-g file</strong>       exists and has the SGID bit set<br />
<strong>-k file</strong>      exists and has the SVTX sticky bit set<br />
<strong>-e file     </strong>  exists<br />
<strong>-f file</strong>      exists and is an ordinary file<br />
<strong>-d file     </strong> exists and is a directory<br />
<strong>-c file     </strong> exists as a character special file<br />
<strong>-b file     </strong> exists and is a named pipe file<br />
<strong>-p file</strong>      exists and is a named pipe file<br />
<strong>-L file     </strong> exists and is a symbolic link</p>
<p><strong>-O file</strong> <strong>     </strong> file exists and its owner is the effective user id<br />
<strong>-G file<strong>     </strong> </strong> file exists and its group is the effective group id<br />
<strong>-S file<strong>     </strong>  </strong>file exists as a socket special file</p>
<p><strong>file1 -ef file2</strong> <strong>     </strong> file1 is another name for file2<br />
<strong>file1 -nt file2<strong>     </strong> </strong> file1 is newer than file2<br />
<strong>file1 -ot file2<strong>     </strong> </strong> file1 is older than file2<br />
<strong>-t des</strong> <strong>     </strong> file descriptor des is open and associated with a terminal device</p>
<h3>Numeric Expressions</h3>
<p>For use with arithmetic</p>
<p><strong>Expression        </strong>Result<br />
<strong>exp1 -eq exp2</strong>      exp1 is equal to exp2<br />
<strong>exp1 -ne exp2</strong>      exp1 is not equal to exp2<br />
<strong>expl -lt exp2</strong>      exp1 is less than exp2<br />
<strong>exp1 -le exp2</strong>      exp1 is less than or equal to exp2<br />
<strong>exp1 -gt exp2</strong>      exp1 is greater than exp2<br />
<strong>exp1 -ge exp2</strong>     exp1 is greater than or equal to exp2</p>
<h3>String Expressions</h3>
<p>While examining strings use the following<br />
<strong>Parameter</strong>        Meaning<br />
<strong>-n str</strong>      string is non-zero in length<br />
<strong>-z str</strong>     string is zero in length<br />
<strong>str1 = str2</strong>     str1 is the same as str2<br />
<strong>str1 != str2    </strong> str1 is not the same as str2</p>
<p><strong>[[ str = pattern ]]</strong>     str matches pattern<br />
<strong>[[ str != pattern ]]</strong>      str does not match pattern<br />
<strong>[[ str1 &lt; str2 ]]  </strong>   str1 is before str2 in the ASCII collation seq.<br />
<strong>[[ str1 &gt; str2 ]]</strong>     str1 is after str2 in the ASCII collation seq.<br />
<strong>[[ -o opt ]]</strong>     option opt is on for this shell</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/korn-shell-ksh-command-test-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common FTP Commands</title>
		<link>http://icancompute.ca/aix/commands/common-ftp-commands/</link>
		<comments>http://icancompute.ca/aix/commands/common-ftp-commands/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 14:51:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[ftp]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=254</guid>
		<description><![CDATA[Here are some common commands that we all use to move files around using FTP ? -&#62; to request help or information about the FTP commands ascii -&#62; to set the mode of file transfer to ASCII (this is the default and transmits seven bits per character) binary -&#62; to set the mode of file transfer to binary (the [...]]]></description>
				<content:encoded><![CDATA[<p>Here are some common commands that we all use to move files around using FTP</p>
<h3></h3>
<p><center style="text-align: -webkit-left;"><strong>? -&gt;</strong> to request help or information about the FTP commands<br />
<strong>ascii</strong> <strong>-&gt;</strong> to set the mode of file transfer to ASCII (this is the default and transmits seven bits per character)<br />
<strong>binary</strong> <strong>-&gt;</strong> to set the mode of file transfer to binary (the binary mode transmits all eight bits per byte and thus provides less chance of a transmission error and must be used to transmit files other than ASCII files)<br />
<strong>bye</strong> <strong>-&gt;</strong> to exit the FTP environment (same as quit)<br />
<strong>cd</strong> <strong>-&gt;</strong> to change directory on the remote machine<br />
<strong>close</strong> <strong>-&gt;</strong> to terminate a connection with another computer<br />
<strong>close brubeck</strong> <strong>-&gt;</strong> closes the current FTP connection with brubeck, but still leaves you within the FTP environment.<br />
<strong>delete</strong> <strong>-&gt;</strong> to delete (remove) a file in the current remote directory (same as rm in UNIX)<br />
<strong>get</strong> <strong>-&gt;</strong> to copy one file from the remote machine to the local machine<br />
<strong>get ABC DEF</strong> <strong>-&gt;</strong> copies file ABC in the current remote directory to (or on top of) a file named DEF in your current local directory.<br />
<strong>get ABC</strong> <strong>-&gt;</strong> copies file ABC in the current remote directory to (or on top of) a file with the same name, ABC, in your current local directory.<br />
<strong>help</strong> <strong>-&gt;</strong> to request a list of all available FTP commands<br />
<strong>lcd</strong> <strong>-&gt;</strong> to change directory on your local machine (same as UNIX cd)<br />
<strong>ls</strong> <strong>-&gt;</strong> to list the names of the files in the current remote directory<br />
<strong>mkdir</strong> <strong>-&gt;</strong> to make a new directory within the current remote directory<br />
<strong>mget</strong> <strong>-&gt;</strong> to copy multiple files from the remote machine to the local machine; you are prompted for a y/n answer before transferring each file<br />
<strong>mget</strong> * <strong>-&gt;</strong> copies all the files in the current remote directory to your current local directory, using the same filenames. Notice the use of the wild card character, *.<br />
<strong>mput</strong> <strong>-&gt;</strong> to copy multiple files from the local machine to the remote machine; you are prompted for a y/n answer before transferring each file<br />
<strong>open</strong> <strong>-&gt;</strong> to open a connection with another computer<br />
<strong>open brubeck</strong> <strong>-&gt;</strong> opens a new FTP connection with brubeck; you must enter a username and password for a brubeck account (unless it is to be an anonymous connection).<br />
<strong>put</strong> <strong>-&gt;</strong> to copy one file from the local machine to the remote machine<br />
<strong>pwd</strong> <strong>-&gt;</strong> to find out the pathname of the current directory on the remote machine<br />
<strong>quit</strong> <strong>-&gt;</strong> to exit the FTP environment (same as bye)<br />
<strong>rmdir</strong> <strong>-&gt;</strong> to to remove (delete) a directory in the current remote directory</center>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/common-ftp-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTP Script &#124; AIX to Windows Share</title>
		<link>http://icancompute.ca/aix/commands/ftp-script-aix-windows-share/</link>
		<comments>http://icancompute.ca/aix/commands/ftp-script-aix-windows-share/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 14:38:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[General Maintenance]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[put]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=251</guid>
		<description><![CDATA[Often times you may want to create a script to copy, move or grab files from your AIX machine to a Windows (or other) box.  In some cases, there may a shared Windows drive created office wide and you would like to dump system information or reporting here.  If ssh is not supported on the [...]]]></description>
				<content:encoded><![CDATA[<p>Often times you may want to create a script to copy, move or grab files from your AIX machine to a Windows (or other) box.  In some cases, there may a shared Windows drive created office wide and you would like to dump system information or reporting here.  If ssh is not supported on the other end, you will need to use FTP.</p>
<p><a title="Common FTP Commands" href="http://icancompute.ca/aix/aix-commands/common-ftp-commands/" target="_blank">General FTP Commands</a></p>
<p>Here is a quick script to move files from your AIX box to your Windows share.</p>
<p>ftpmove(){</p>
<p>ftp -n &lt;&lt;-EOF<br />
open <em>fully_qualified_server_name</em><br />
user <em>username</em> <em>password</em><br />
cd <em>path/to/file</em><br />
put <em>file_to_copy_to_windows</em></p>
<p><em></em>get <em>file_to_copy_to_aix</em></p>
<p>EOF<br />
}</p>
<p>ftpmove</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/ftp-script-aix-windows-share/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIX Command &#124; Exporting NFS: exportfs vs mknfsexp</title>
		<link>http://icancompute.ca/aix/commands/aix-commands-exporting-nfs-exportfs-mknfsexp/</link>
		<comments>http://icancompute.ca/aix/commands/aix-commands-exporting-nfs-exportfs-mknfsexp/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 17:04:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[LPAR Configuration]]></category>
		<category><![CDATA[/etc/exports]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[exportfs]]></category>
		<category><![CDATA[mknfsexp]]></category>
		<category><![CDATA[nfs]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=232</guid>
		<description><![CDATA[Every once in awhile you will find a quaint little reminder that AIX is not UNIX.  I worked in a shop where we used third party software connecting our servers to the vendor&#8217;s servers through an NFS mount.  The unfortunate thing was that when we rebooted the server, for some unknown reason some of the [...]]]></description>
				<content:encoded><![CDATA[<p>Every once in awhile you will find a quaint little reminder that AIX is not UNIX.  I worked in a shop where we used third party software connecting our servers to the vendor&#8217;s servers through an NFS mount.  The unfortunate thing was that when we rebooted the server, for some unknown reason some of the exports were not persistent.  This created a whirlwind of problems, resulting in making customer service support tickets and waiting for the vendor to reissue their mount.<br />
If you have been working with AIX for more than a couple days, you know that there are multiple ways to complete any one task.  You may also know that AIX still incorporates many UNIX commands, and also has (seemingly redundant) AIX proprietary commands.  This example is a great explanation of why this is.</p>
<p>One of the things I like to tell people is that anything <strong>hardware related</strong>, the commands <strong>HAVE to be AIX commands</strong> in order to update the <strong>ODM</strong>.  In the example of <strong>nfs exports</strong>, we see that while you can issue a simple &#8220;<strong>exportfs</strong>&#8221; command, the tried and true method in UNIX, issueing the &#8220;<strong>mknfsexp</strong>&#8221; command with the &#8220;<strong>-B</strong>&#8221; flag will update the <strong>/etc/exports</strong> file making the export persistent.</p>
<p>This is a simple lesson, but it teaches something much more important.  Try not to rely on your background knowledge of UNIX if you are moving over from another environment.  A wise man once told me, over and over again, <strong>AIX is not UNIX!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/aix-commands-exporting-nfs-exportfs-mknfsexp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIX Command: lssyscfg &#8212; HMC command to view system configuration</title>
		<link>http://icancompute.ca/aix/commands/aix-command-lssyscfg-hmc-command-view-system-configuration/</link>
		<comments>http://icancompute.ca/aix/commands/aix-command-lssyscfg-hmc-command-view-system-configuration/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 16:23:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[hmc command]]></category>
		<category><![CDATA[hmc data]]></category>
		<category><![CDATA[lssyscfg]]></category>
		<category><![CDATA[system information]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=194</guid>
		<description><![CDATA[Command: &#8220;lssyscfg&#8221; will return system configuration information stored on the HMC.  This can be used to extract information on partitions, partition profiles, managed systems, system profiles.  This is a very useful tool for developing an understanding of a large environment that is managed by an HMC. Usage: lssyscfg -r sys -F &#8220;name&#8221; -&#62; List all [...]]]></description>
				<content:encoded><![CDATA[<h2><strong>Command:</strong></h2>
<p>&#8220;lssyscfg&#8221; will return system configuration information stored on the HMC.  This can be used to extract information on partitions, partition profiles, managed systems, system profiles.  This is a very useful tool for developing an understanding of a large environment that is managed by an HMC.</p>
<h2><strong>Usage:</strong></h2>
<p>lssyscfg -r sys -F &#8220;name&#8221; -&gt; List all CEC&#8217;s on HMC<br />
lssyscfg -r lpar -m [CEC] -F &#8220;name&#8221; -&gt; List all LPARs on CEC<br />
lssyscfg -r lpar -m [CEC] &#8211;filter &#8220;lpar_names=[lpar]&#8221; -&gt; List information on specific LPAR</p>
<p>&nbsp;</p>
<h2><strong>MAN Page:</strong></h2>
<p>&nbsp;</p>
<div>
<p><strong>NAME</strong></p>
</div>
<p>lssyscfg &#8211; list system resources</p>
<div>
<p><strong>SYNOPSIS</strong></p>
</div>
<p><strong>lssyscfg -r </strong>{<strong>lpar </strong>| <strong>prof </strong>| <strong>sys </strong>| <strong>sysprof </strong>| <strong>cage </strong>| <strong>frame</strong>} [<strong>-m </strong><em>managed-system </em>| <strong>-e </strong><em>managed-frame</em>] [<strong>--filter "</strong><em>filter-data</em><strong>"</strong>] [<strong>-F </strong>[<em>attribute-names</em>] [<strong>--header</strong>]] [<strong>--help</strong>]</p>
<div>
<p><strong>DESCRIPTION</strong></p>
</div>
<p><strong>lssyscfg </strong>lists the attributes of partitions, partition profiles, or system profiles for the <em>managed-system</em>. It can also list the attributes of the <em>managed-system</em>, and of all of the systems managed by this Hardware Management Console (HMC).</p>
<p><strong>lssyscfg </strong>can also list the attributes of cages in the <em>managed-frame</em>, the attributes of the <em>managed-frame</em>, or the attributes of all of the frames managed by this HMC.</p>
<div>
<p><strong>OPTIONS</strong></p>
</div>
<p><strong>-r</strong></p>
<dl>
<dt></dt>
<dd>The type of resources to list. Valid values are <strong>lpar </strong>for partitions, <strong>prof </strong>for partition profiles, <strong>sys </strong>for managed systems, <strong>sysprof </strong>for system profiles, <strong>cage </strong>for managed frame cages, and <strong>frame </strong>for managed frames.</dd>
<dt></dt>
</dl>
<p><strong>-m</strong></p>
<dl>
<dt></dt>
<dd>The name of either the managed system to list, or the managed system which has the system resources to list. The name may either be the user-defined name for the managed system, or be in the form<em>tttt</em><strong>-</strong><em>mmm</em><strong>*</strong><em>ssssssss</em>, where <em>tttt </em>is the machine type, <em>mmm </em>is the model, and <em>ssssssss </em>is the serial number of the managed system. The <em>tttt</em><strong>-</strong><em>mmm</em><strong>*</strong><em>ssssssss </em>form must be used if there are multiple managed systems with the same user-defined name. This option is required when listing partitions, partition profiles, or system profiles. This option is optional when listing managed systems, and if it is omitted, then all of the systems managed by this HMC will be listed. This option is not valid when listing managed frame cages or managed frames.</dd>
<dt></dt>
</dl>
<p><strong>-e</strong></p>
<dl>
<dt></dt>
<dd>The name of either the managed frame to list, or the managed frame which contains the cages to list. The name may either be the user-defined name for the managed frame, or be in the form <em>ttttmmm</em><strong>*</strong><em>ssssssss</em>, where <em>tttt </em>is the type, <em>mmm </em>is the model, and <em>ssssssss </em>is the serial number of the managed frame. The <em>tttt</em><strong>-</strong><em>mmm</em><strong>*</strong><em>ssssssss </em>form must be used if there are multiple managed frames with the same user-defined name. This option is required when listing managed frame cages. This option is optional when listing managed frames, and if it is omitted, then all of the frames managed by this HMC will be listed. This option is not valid when listing partitions, partition profiles, system profiles, or managed systems.</dd>
<dt></dt>
</dl>
<p><strong>&#8211;filter</strong></p>
<dl>
<dt></dt>
<dd>The filter(s) to apply to the resources to be listed. Filters are used to select which resources of the specified resource type are to be listed. If no filters are used, then all of the resources of the specified resource type will be listed. For example, specific partitions can be listed by using a filter to specify the names or IDs of the partitions to list. Otherwise, if no filter is used, then all of the partitions in the managed system will be listed. The filter data consists of filter name/value pairs, which are in comma separated value (CSV) format. The filter data must be enclosed in double quotes.The format of the filter data is as follows:</p>
<p><strong>&#8220;</strong><em>filter-name</em><strong>=</strong><em>value</em><strong>,</strong><em>filter-name</em><strong>=</strong><em>value</em><strong>,</strong>&#8230;<strong>&#8220;</strong></p>
<p>Note that certain filters accept a comma separated list of values, as follows:</p>
<p><strong>&#8220;&#8221;</strong><em>filter-name</em><strong>=</strong><em>value</em><strong>,</strong><em>value</em><strong>,</strong>&#8230;<strong>&#8220;,</strong>&#8230;<strong>&#8220;</strong></p>
<p>When a list of values is specified, the filter name/value pair must be enclosed in double quotes. Depending on the shell being used, nested double quote characters may need to be preceded by an escape character, which is usually a &#8216;\&#8217; character. Unless otherwise indicated, multiple values can be specified for each filter.</p>
<p>Valid filter names for partitions:</p>
<p><strong>lpar_names </strong>| <strong>lpar_ids </strong>| <strong>work_groups</strong></p>
<p>Only one of these three filters may be specified.</p>
<p>Valid filter names for partition profiles:</p>
<p><strong>lpar_names </strong>| <strong>lpar_ids</strong></p>
<p>Either the name or the ID of the partition which has the partition profiles to be listed must be specified. Only one partition name or ID can be specified.</p>
<p><strong>profile_names</strong></p>
<p>Valid filter names for system profiles:</p>
<p><strong>profile_names</strong></p>
<p>This option is required when listing partition profiles. This option is not valid when listing managed systems, managed frame cages, or managed frames.</p>
</dd>
<dt></dt>
</dl>
<p><strong>-F</strong></p>
<dl>
<dt></dt>
<dd>A delimiter separated list of attribute names for the desired attribute values to be displayed for each resource. If no attribute names are specified, then values for all of the attributes for the resource will be displayed. When this option is specified, only attribute values will be displayed. No attribute names will be displayed. The attribute values displayed will be separated by the delimiter which was specified with this option. This option is useful when only attribute values are desired to be displayed, or when the values of only selected attributes are desired to be displayed.</dd>
<dt></dt>
</dl>
<p><strong>&#8211;header</strong></p>
<dl>
<dt></dt>
<dd>Display a header record, which is a delimiter separated list of attribute names for the attribute values that will be displayed. This header record will be the first record displayed. This option is only valid when used with the <strong>-F </strong>option.</dd>
<dt></dt>
</dl>
<p><strong>&#8211;help</strong></p>
<dl>
<dt></dt>
<dd>Display the help text for this command and exit.</dd>
</dl>
<div>
<p><strong>EXAMPLES</strong></p>
</div>
<p>List all systems managed by this HMC:</p>
<p><strong>lssyscfg -r sys</strong></p>
<p>List only the user-defined name, machine type and model, and serial number for all of the systems managed by this HMC, and separate the output values with a colon:</p>
<p><strong>lssyscfg -r sys -F name:type_model:serial_num</strong></p>
<p>List the managed system system1:</p>
<p><strong>lssyscfg -r sys -m system1</strong></p>
<p>List all partitions in the managed system, and only display attribute values for each partition, following a header of attribute names:</p>
<p><strong>lssyscfg -r lpar -m 9406-570*12345678 -F &#8211;header</strong></p>
<p>List the partitions lpar1, lpar2, and lpar3:</p>
<p><strong>lssyscfg -r lpar -m system1 &#8211;filter &#8220;&#8221;lpar_names=lpar1,</strong> <strong>lpar2,lpar3&#8243;&#8221;</strong></p>
<p>List only the names, IDs, and states of partitions lpar1, lpar2, and lpar3, and separate the output values with a comma:</p>
<p><strong>lssyscfg -r lpar -m system1 &#8211;filter &#8220;&#8221;lpar_names=lpar1,</strong> <strong>lpar2,lpar3&#8243;&#8221; -F name,lpar_id,state</strong></p>
<p>List all partition profiles defined for partition lpar2:</p>
<p><strong>lssyscfg -r prof -m system1 &#8211;filter &#8220;lpar_names=lpar2&#8243;</strong></p>
<p>List the partition profiles prof1 and prof2 defined for the partition that has an ID of 2:</p>
<p><strong>lssyscfg -r prof -m system1 &#8211;filter &#8220;lpar_ids=2,</strong> <strong>&#8220;profile_names=prof1,prof2&#8243;&#8221;</strong></p>
<p>List all system profiles defined for the managed system:</p>
<p><strong>lssyscfg -r sysprof -m 9406-520*100128A</strong></p>
<p>List the system profile sysprof1:</p>
<p><strong>lssyscfg -r sysprof -m system1 &#8211;filter &#8220;profile_names=</strong> <strong>sysprof1&#8243;</strong></p>
<p>List all frames managed by this HMC:</p>
<p><strong>lssyscfg -r frame</strong></p>
<p>List the managed frame myFrame:</p>
<p><strong>lssyscfg -r frame -e myFrame</strong></p>
<p>List all cages in the managed frame:</p>
<p><strong>lssyscfg -r cage -e 9119-59*000012C</strong></p>
<div>
<p><strong>ENVIRONMENT</strong></p>
</div>
<p>None</p>
<div>
<p><strong>BUGS</strong></p>
</div>
<p>None</p>
<div>
<p><strong>SEE ALSO</strong></p>
</div>
<p><a href="http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/topic/iphcx_p5/chsyscfg.htm">chsyscfg</a>, <a href="http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/topic/iphcx_p5/mksyscfg.htm">mksyscfg</a>, <a href="http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/topic/iphcx_p5/rmsyscfg.htm">rmsyscfg</a>, <a href="http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/topic/iphcx_p5/lshwres.htm">lshwres</a></p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/aix-command-lssyscfg-hmc-command-view-system-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
