<?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>Jorink.nl &#187; CLI</title>
	<atom:link href="http://www.jorink.nl/tag/cli/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jorink.nl</link>
	<description>Just for documentation</description>
	<lastBuildDate>Thu, 15 Dec 2011 09:36:12 +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>List of users with their email adresses</title>
		<link>http://www.jorink.nl/2011/05/list-of-users-with-their-email-adresses/</link>
		<comments>http://www.jorink.nl/2011/05/list-of-users-with-their-email-adresses/#comments</comments>
		<pubDate>Thu, 12 May 2011 09:58:06 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Batch files]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[CLI]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=560</guid>
		<description><![CDATA[csvde -f yourfile.csv -r "(&#38;(objectCategory=Person)(objectClass=user))" –l "sAMaccountname,mail"]]></description>
			<content:encoded><![CDATA[<p><code>csvde -f yourfile.csv -r "(&amp;(objectCategory=Person)(objectClass=user))" –l "sAMaccountname,mail"</code><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2011/05/list-of-users-with-their-email-adresses/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing password complexity ESX(i) 4</title>
		<link>http://www.jorink.nl/2011/02/changing-password-complexity-esxi-4/</link>
		<comments>http://www.jorink.nl/2011/02/changing-password-complexity-esxi-4/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 16:13:33 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[VMWare]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=528</guid>
		<description><![CDATA[Some have noticed that the password requirements for ESXi 4.0 logins have become more stringent. In some cases, it may be desirable to edit those settings to make the password standards for ESXi 4.0 either stronger or weaker. Password requirements for ESXi are controlled by the file /etc/pam.d/common-password. Changes to this file will take effect [...]]]></description>
			<content:encoded><![CDATA[<p>Some have noticed that the password requirements for ESXi 4.0 logins have become more stringent. In  some cases, it may be desirable to edit those settings to make the  password standards for ESXi 4.0 either stronger or weaker. Password  requirements for ESXi are controlled by the file  /etc/pam.d/common-password. Changes to this file will take effect  immediately and will not require a reboot. The sticky bit for the file  is enabled, so changes will be backed up into the system configuration  backup file for the host. As this is not a supported changed, caution is  advised and a system backup is recommended before making changes.</p>
<p>By default the common-password file will contain the  following text and it is the min option (min=a1,a2,a3,a4,a5) that will  control password complexity.</p>
<p>#%PAM-1.0<br />
password requisite /lib/security/$ISA/pam_passwdqc.so retry=3 min=8,8,8,7,6<br />
password sufficient /lib/security/$ISA/pam_unix.so use_authtok md5 shadow<br />
password required /lib/security/$ISA/pam_deny.so</p>
<p>a1 is the password length for passwords that contain  one character class. The character classes are lower case characters,  upper cases characters, digits and other characters. a2 is the password  length for passwords that contain 2 character classes. a3 is used for  password phrases. a4 and a5 is the password length required when using 3  or 4 character classes. It should be noted that the first and last  character of the password will not count towards the character class  count. So the password of &#8216;Password&#8217; will only have 1 character class,  while the password of &#8216;PassWord&#8217; will have 2.</p>
<p><strong>Note:</strong> the values for a1 to a5 must be  equal or smaller than the prior value, so min=8,7,7,6,5 will be valid,  but min=7,8,9,8,7 will not be. If min=7,8,9,8,7 were used, the error  &#8216;User name or password has an invalid format&#8217; would be generated even if  you used a single class password will a length of 7 or more characters.</p>
<p><strong>Sample changes to password complexity</strong></p>
<p>1) To <strong>reduce</strong> the minimum password  length to 6 characters, set min=6,6,6,6,6. As noted above, the values  used for a1 to a5 must not be larger than the prior value.</p>
<p>2) To <strong>disable</strong> the use of one or two  class passwords, set min=disabled,disabled,8,8,6. Note that this  setting, password of &#8216;Password1&#8242; would not be valid as the character  class count would only be one. A password of &#8216;pAssw0rd&#8217; would have a  class count of 3 and thus be acceptable with a length of 8.</p>
<p>3) To <strong>turn off</strong> the enforcing of  strong passwords, use the enforce option. Valid values for the option  are none, users and everyone. So if the common-password file is changed  to the below, then a single character password will be allowed  regardless of the settings for the min option.</p>
<p>#%PAM-1.0<br />
password requisite /lib/security/$ISA/pam_passwdqc.so retry=3 min=8,8,8,7,6 enforce=none<br />
password sufficient /lib/security/$ISA/pam_unix.so use_authtok md5 shadow<br />
password required /lib/security/$ISA/pam_deny.so</p>
<p>Source: <a href="http://www.vm-help.com/esx40i/password_complexity.php" target="_blank">vm-help.com</a><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2011/02/changing-password-complexity-esxi-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ESXi 4 Enable SSH</title>
		<link>http://www.jorink.nl/2011/02/esxi-4-enable-ssh/</link>
		<comments>http://www.jorink.nl/2011/02/esxi-4-enable-ssh/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 15:16:48 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[VMWare]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=524</guid>
		<description><![CDATA[ESXi 40 does ship with the ability to run SSH, but this is disabled by default (and is not supported). If you just need to access the console of ESXi, then you only need to perform steps 1 &#8211; 3. 1) At the console of the ESXi host, press ALT-F1 to access the console window. [...]]]></description>
			<content:encoded><![CDATA[<p>ESXi 40 does ship with the ability to run SSH, but this is disabled by default (and is not supported). If you just need to access the console of ESXi, then you only need to perform steps 1 &#8211; 3.</p>
<p>1) At the console of the ESXi host, press ALT-F1 to access the console window.<br />
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.<br />
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.<br />
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command vi /etc/inetd.conf).<br />
5) Find the lines that begins with #ssh and remove the #. Then save the file. If you&#8217;re new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file. Note: there are two lines for SSH with ESXi 4.0 now &#8211; one for regular IP and the other for IPv6. You should the line appropriate to the protocol you&#8217;ll use to access your host.<br />
6) Once you&#8217;ve closed the vi editor, you can either restart the host or restart the inetd process. To restart inetd run ps | grep inetd to determine the process ID for the inetd process. The output of the command will be something like 1299 1299 busybox      inetd, and the process ID is 1299. Then run kill -HUP<br />
(kill -HUP 1299 in this example) and you&#8217;ll then be able to access the host via SSH.</p>
<p>Tip &#8211; with some applications like WinSCP, the default encryption cipher used is AES. If you change that to Blowfish you will likely see significantly faster transfers.</p>
<p>Changing the port for SSH</p>
<p>To change the port for SSH, edit the file /etc/services and change the SSH port listed in the file. Save the file and repeat step 6 above.</p>
<p>Enable Telnet</p>
<p>The steps are the same as with SSH, but you&#8217;ll remove the # from the 2 telnet entries in /etc/inetd.conf. Enabling telnet is not recommended if security is a concern.</p>
<p>You can also download an oem.tgz file which will enable SSH (and FTP). Copy the file to a datastore with the VI client and then to bootbank with the command cp /vmfs/volumes//oem.tgz /bootbank/oem.tgz and then reboot.</p>
<p>Enable SSH access for a non-root account</p>
<p>Use the following process to enable SSH access for a non-root account<br />
1) Access SSH or the console with a root account.<br />
2) Create a new account with the command useradd  -M -d/ . This will set the home directory to / instead of requiring a /home directory.<br />
3) Use the command passwd  to set the password for your new login.<br />
4) Edit the passwd file with vi /etc/passwd. For the entry for your new account, change the /bin/sh part to /bin/ash. Save the file and exit. See the example for the test1 user below.</p>
<p>root:x:0:0:Administrator:/:/bin/ash<br />
nobody:x:99:99:Nobody:/:/sbin/nologin<br />
nfsnobody:x:65534:65534:Anonymous NFS User:/:/sbin/nologin<br />
dcui:x:100:100:DCUI User:/:/sbin/nologin<br />
daemon:x:2:2:daemon:/:/sbin/nologin<br />
vimuser:x:12:20:vimuser:/sbin:/sbin/nologin<br />
test1:x:500:500:Linux User,,,:/:/bin/ash</p>
<p>You should now be able to connect with SSH using this new account.</p>
<p>Disable SSH access for the root account</p>
<p>If you have created non-root accounts for SSH access you can also disable root access via SSH. Edit the /etc/inetd.conf file using the initial process on this page and add the option -w after the -i option. The line in inetd.conf will appear similar to the below.</p>
<p>ssh stream tcp nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i -w -K60</p>
<p>One you have made the change, save the file and run the kill -HUP command to restart the inetd process. You will now be able to login with a non-root account, but will get access denied if you use a root account. Once you have established a SSH session with your non-root account you can issue the command su &#8211; to switch to the root account.</p>
<p>Source : <a href="http://www.vm-help.com/esx40i/ESXi_enable_SSH.php">vm-help.com</a><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2011/02/esxi-4-enable-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the WINSXS directory in Windows 2008 and Windows Vista and why is it so large?</title>
		<link>http://www.jorink.nl/2011/02/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large/</link>
		<comments>http://www.jorink.nl/2011/02/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 16:01:31 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Windows 2008]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=510</guid>
		<description><![CDATA[A commonly asked question among people looking at a Windows Vista or Windows Server 2008 installation is “why is the WinSxS folder so big?!”   To answer that question I need to first describe componentization, and how components are managed in Windows Vista. One of the largest changes between previous versions of Windows and Windows Vista [...]]]></description>
			<content:encoded><![CDATA[<p>A commonly asked question among people  looking at a Windows Vista or Windows Server 2008 installation is “why  is the WinSxS folder so big?!”   To answer that question I need to first  describe componentization, and how components are managed in Windows  Vista.</p>
<p>One of the largest  changes between previous versions of Windows and Windows Vista was a  move from an INF described OS to componentization.  A component in  Windows is one or more binaries, a catalog file, and an XML file that  describes everything about how the files should be installed. From  associated registry keys and services to what kind security permissions  the files should have.  Components are grouped into logical units, and  these units are used to build the different Windows editions.</p>
<p>All  of the components in the operating system are found in the WinSxS  folder – in fact we call this location the component store.  Each  component has a unique name that includes the version, language, and  processor architecture that it was built for.  The WinSxS folder is the  only location that the component is found on the system, all other  instances of the files that you see on the system are “projected” by  hard linking from the component store.  Let me repeat that last point –  there is only one instance (or full data copy) of each version of each  file in the OS, and that instance is located in the WinSxS folder.   So  looked at from that perspective, the WinSxS folder is really the  entirety of the whole OS, referred to as a &#8220;flat&#8221; in down-level  operating systems.  This also accounts for why you will no longer be  prompted for media when running operations such as System File Checker  (SFC), or when installing additional features and roles.<span id="more-510"></span></p>
<p>That  explains why the folder starts off big, but not why it gets larger over  time – the answer to that question is servicing.   In previous versions  of Windows the atomic unit of servicing was the file, in Windows Vista  it’s the component.  When we update a particular binary we release a new  version of the whole component, and that new version is stored  alongside the original one in the component store.  The higher version  of the component is projected onto the system, but the older version in  the store isn’t touched.  The reason for that is the third part of why  the component store gets so large.</p>
<p>Not  every component in the component store is applicable, meaning that not  every component should be projected onto the system.  For example, on  systems where IIS is available but has not been installed, the IIS  components are present in the store, but not projected into any location  on the system where they might be used.  If you’re familiar with how  multi-branch servicing works in previous versions of Windows then it’ll  make sense to you that we have a different version of the component for  each distribution branch and service pack level, and that all these  different versions are also stored in the WinSxS folder, even if they’re  not immediately applicable.  So a single Post SP1 GDR package that  contains an update to one component will end up installing four versions  of that component in the WinSxS folder – double that on a 64 bit  operating system for some components.</p>
<p>Now  that you know why the store can grow to be so large, your next question  is probably to ask why we don’t remove the older versions of the  components.  The short answer to that is reliability.  The component  store, along with other information on the system, allows us to  determine at any given time what the best version of a component to  project is.  That means that if you uninstall a security update we can  install the next highest version on the system – we no longer have an  “out of order uninstall” problem.  It also means that if you decide to  install an optional feature, we don’t just choose the RTM version of the  component, we’ll look to see what the highest available version on the  system is.  As each component on the system changes state that may in  turn trigger changes in other components, and because the relationships  between all the components are described on the system we can respond to  those requirements in ways that we couldn’t in previous OS versions.</p>
<p>The  only way to safely reduce the size of the WinSxS folder is to reduce  the set of possible actions that the system can take – the easiest way  to do that is to remove the packages that installed the components in  the first place.  This can be done by uninstalling superseded versions  of packages that are on your system.  Service Pack 1 contains a binary  called VSP1CLN.EXE, a tool that will make the Service Pack package  permanent (not removable) on your system,  and remove the RTM versions  of all superseded components.  This can only be done because by making  the Service Pack permanent we can guarantee that we won’t ever need the  RTM versions. In Service Pack 2 this tool is replaced with COMPCLN</p>
<p><a href="http://www.jorink.nl/wp-content/uploads/2011/02/compcln_2C04CB63.png" rel="lightbox[510]" title="compcln_2C04CB63"><img class="alignnone size-full wp-image-511" title="compcln_2C04CB63" src="http://www.jorink.nl/wp-content/uploads/2011/02/compcln_2C04CB63.png" alt="" width="640" height="321" /></a></p>
<p>So yes, the  WinSXS folder is very large, and it will continue to grow as the OS  ages.  I hope that this clears up some of the questions about why that  is, and what you can do about it. Note that the Windows servicing  structure and the layout of the store is subject to change.</p>
<p>Source : <a href="http://blogs.technet.com/b/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx" target="_blank">Technet</a><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2011/02/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Delete all thumbs.db</title>
		<link>http://www.jorink.nl/2010/11/delete-all-thumbs-db/</link>
		<comments>http://www.jorink.nl/2010/11/delete-all-thumbs-db/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 14:30:27 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Batch files]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>
		<category><![CDATA[Ubuntu 10.10]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=485</guid>
		<description><![CDATA[Windows creates in every folder with pictures a thumbs.db file. Linux doesn&#8217;t need them, so here is a simple command to get rid of them. sudo find /home/user -name Thumbs.db -exec rm {} \;]]></description>
			<content:encoded><![CDATA[<p>Windows creates in every folder with pictures a thumbs.db file.</p>
<p>Linux doesn&#8217;t need them, so here is a simple command to get rid of them.</p>
<p><code>sudo find /home/user -name Thumbs.db -exec rm {} \;</code><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2010/11/delete-all-thumbs-db/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remove empty directories</title>
		<link>http://www.jorink.nl/2010/11/remove-empty-directories/</link>
		<comments>http://www.jorink.nl/2010/11/remove-empty-directories/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 14:28:20 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Batch files]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>
		<category><![CDATA[Ubuntu 10.10]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=483</guid>
		<description><![CDATA[To remove empty directories in a directory structure use the following command : sudo find /begin/here -type d -empty -delete]]></description>
			<content:encoded><![CDATA[<p>To remove empty directories in a directory structure use the following command :</p>
<p><code>sudo find /begin/here -type d -empty -delete</code><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2010/11/remove-empty-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apply the &#8220;200 Lines Kernel Patch That Does Wonders&#8221;</title>
		<link>http://www.jorink.nl/2010/11/apply-the-200-lines-kernel-patch-that-does-wonders/</link>
		<comments>http://www.jorink.nl/2010/11/apply-the-200-lines-kernel-patch-that-does-wonders/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 16:09:49 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Ubuntu 10.10]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=475</guid>
		<description><![CDATA[The script has only been tested on Ubuntu (10.10 an 10.04) Even though I&#8217;ve tested the script, it may not work for everybody so use it as is. There are no guarantees it will work and I take no responsibility if it doesn&#8217;t. Always check the code of a script you run on your computer. [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>The script has only been tested on Ubuntu (10.10 an 10.04)</li>
<li>Even though I&#8217;ve tested the script, it may not work for everybody so use it as is. There are no guarantees it will work and I take no responsibility if it doesn&#8217;t.</li>
<li>Always check the code of a script you run on your computer. You can download the script from <a href="http://launchpadlibrarian.net/59511828/cgroup_patch" target="_blank">HERE</a>.</li>
</ul>
<div>Now that you&#8217;ve read the &#8220;disclaimer&#8221;, you can go ahead and use the script.</div>
<div><strong>Open a terminal and copy/paste the following commands:</strong></div>
<pre><code>cd
wget http://launchpadlibrarian.net/59511828/cgroup_patch
chmod +x cgroup_patch
sudo ./cgroup_patch</code></pre>
<p><strong>Now you can either restart your computer or simply run:</strong></p>
<pre><code>sudo /etc/rc.local</code></pre>
<div><em>Credits and many thanks for the script: superpiwi @ <a href="http://ubuntulife.wordpress.com/2010/11/22/el-parche-milagro-de-linux-ahora-con-script-de-instalacion/">Ubuntu Life</a>.</em></div>
<div><em>Original post : <a href="http://www.webupd8.org/2010/11/script-to-automatically-apply-200-lines.html" target="_blank">WebUpd8</a><br />
</em></div>
<p><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2010/11/apply-the-200-lines-kernel-patch-that-does-wonders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tcpdump &#8211; Detailed Network Traffic Analysis</title>
		<link>http://www.jorink.nl/2010/10/tcpdump-detailed-network-traffic-analysis/</link>
		<comments>http://www.jorink.nl/2010/10/tcpdump-detailed-network-traffic-analysis/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 14:40:18 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=447</guid>
		<description><![CDATA[The tcpdump is simple command that dump traffic on a network. However, you need good understanding of TCP/IP protocol to utilize this tool. For.e.g to display traffic info about DNS, enter: tcpdump -i eth1 'udp port 53' To display all IPv4 HTTP packets to and from port 80, i.e. print only packets that contain data, [...]]]></description>
			<content:encoded><![CDATA[<p>The tcpdump is simple command that dump traffic on a network.  However, you need good understanding of TCP/IP protocol to utilize this  tool.  For.e.g to display traffic info about DNS, enter:<br />
<code>tcpdump -i eth1 'udp port 53'</code><br />
To display all IPv4 HTTP packets to and from port 80, i.e. print only  packets that contain data, not, for example, SYN and FIN packets and  ACK-only packets, enter:<br />
<code># tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&amp;0xf)&lt;&lt;2)) - ((tcp[12]&amp;0xf0)&gt;&gt;2)) != 0)'</code><br />
To display all FTP session to 202.54.1.5, enter:<br />
<code># tcpdump -i eth1 'dst 202.54.1.5 and (port 21 or 20'</code><br />
To display all HTTP session to 192.168.1.5:<br />
<code># tcpdump -ni eth0 'dst 192.168.1.5 and tcp and port http'</code><br />
Use <a href="http://www.cyberciti.biz/faq/linux-unix-bsd-apache-tcpdump-http-packets-sniffing/">wireshark to view detailed</a> information about files, enter:<br />
<code># tcpdump -n -i eth1 -s 0 -w output.txt src or dst port 80</code><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2010/10/tcpdump-detailed-network-traffic-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show running processes in Linux</title>
		<link>http://www.jorink.nl/2010/10/show-running-processes-in-linux/</link>
		<comments>http://www.jorink.nl/2010/10/show-running-processes-in-linux/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 14:12:42 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CLI]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=440</guid>
		<description><![CDATA[ps command Type the following ps command to display all running process: # ps aux &#124; less Where, * -A: select all processes * a: select all processes on a terminal, including those of other users * x: select processes without controlling ttys Task: see every process on the system # ps -A # ps [...]]]></description>
			<content:encoded><![CDATA[<h2>ps command</h2>
<p>Type the following ps command to display all running process:<br />
# ps aux | less</p>
<p>Where,</p>
<p>* -A: select all processes<br />
* a: select all processes on a terminal, including those of other users<br />
* x: select processes without controlling ttys</p>
<h2>Task: see every process on the system</h2>
<p># ps -A<br />
# ps -e</p>
<h2>Task: See every process except those running as root</h2>
<p># ps -U root -u root -N</p>
<h2>Task: See process run by user vivek</h2>
<p># ps -u vivek</p>
<h2>Task: top command</h2>
<p>The top program provides a dynamic real-time view of a running system.<br />
Type the top at command prompt:<br />
# top</p>
<p>To quit press q, for help press h.</p>
<h2>Task: display a tree of processes</h2>
<p>pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown.<br />
$ pstree</p>
<h2>Task: Print a process tree using ps</h2>
<p># ps -ejH<br />
# ps axjf</p>
<h2>Task: Get info about threads</h2>
<p>Type the following command:<br />
# ps -eLf<br />
# ps axms</p>
<h2>Task: Get security info</h2>
<p>Type the following command:<br />
# ps -eo euser,ruser,suser,fuser,f,comm,label<br />
# ps axZ<br />
# ps -eM</p>
<h2>Task: Save Process Snapshot to a file</h2>
<p>Type the following command:<br />
# top -b -n1 &gt; /tmp/process.log<br />
Or you can email result to yourself:<br />
# top -b -n1 | mail -s &#8216;Process snapshot&#8217; you@example.com</p>
<h2>Task: Lookup process</h2>
<p>Use pgrep command. pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to screen. For example display firefox process id:<br />
$ pgrep firefox</p>
<p>Following command will list the process called sshd which is owned by root user.<br />
$ pgrep -u root sshd</p>
<p>Source : <a href="http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/" target="_blank">nixCraft</a><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2010/10/show-running-processes-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing VMWare Tools in SLES CLI</title>
		<link>http://www.jorink.nl/2010/10/installing-vmware-tools-in-sles-cli/</link>
		<comments>http://www.jorink.nl/2010/10/installing-vmware-tools-in-sles-cli/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 15:05:01 +0000</pubDate>
		<dc:creator>Arjan Jorink</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[CLI]]></category>

		<guid isPermaLink="false">http://www.jorink.nl/?p=438</guid>
		<description><![CDATA[In the VMWare Infrastructure Client select VM -> Install/Upgrade VMware Tools In the CLI type the following mkdir /media/cdrom mount /dev/cdrom /media/cdrom rpm -Uhv /media/cdrom/VMwareTools-3.5.0-{version}.i386.rpm SuSEconfig vmware-config-tools.pl ( If you&#8217;re getting gcc error&#8217;s check this post ) /etc/init.d/network stop rmmod pcnet32 rmmod vmxnet depmod -ae modprobe vmxnet /etc/init.d/network start Done]]></description>
			<content:encoded><![CDATA[<p>In the VMWare Infrastructure Client select VM -> Install/Upgrade VMware Tools</p>
<p>In the CLI type the following</p>
<p>mkdir /media/cdrom<br />
mount /dev/cdrom /media/cdrom<br />
rpm -Uhv /media/cdrom/VMwareTools-3.5.0-{version}.i386.rpm<br />
SuSEconfig<br />
vmware-config-tools.pl ( If you&#8217;re getting gcc error&#8217;s <a href="http://www.jorink.nl/2010/10/install-vmware-tools-under-sles-11-sp1/">check this post</a> )<br />
/etc/init.d/network stop<br />
rmmod pcnet32<br />
rmmod vmxnet<br />
depmod -ae<br />
modprobe vmxnet<br />
/etc/init.d/network start</p>
<p>Done<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jorink.nl/2010/10/installing-vmware-tools-in-sles-cli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

