<?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>Unix Tutorial &#187; Linux</title>
	<atom:link href="http://www.unixtutorial.org/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unixtutorial.org</link>
	<description>Learn UNIX</description>
	<lastBuildDate>Wed, 03 Mar 2010 22:55:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How To Disable IPv6 in Red Hat Linux</title>
		<link>http://www.unixtutorial.org/2009/12/how-to-disable-ipv6-in-red-hat-linux/</link>
		<comments>http://www.unixtutorial.org/2009/12/how-to-disable-ipv6-in-red-hat-linux/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 10:37:45 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=621</guid>
		<description><![CDATA[Since it may be a while before I'm ready to use the IPv6 on my systems, I've been disabling IPv6 on most servers so far. And since there's a particularly elegant way of doing this in Red Hat Linux, I think it's worth sharing.
How to confirm if IPv6 is running on your system
IPv6 is implemented [...]]]></description>
			<content:encoded><![CDATA[<p>Since it may be a while before I'm ready to use the <strong>IPv6 </strong>on my systems, I've been disabling IPv6 on most servers so far. And since there's a particularly elegant way of doing this in Red Hat Linux, I think it's worth sharing.</p>
<h3>How to confirm if IPv6 is running on your system</h3>
<p><strong>IPv6 </strong>is implemented as a kernel module, so you can use the <strong>lsmod </strong>command to confirm if it's currently running on your Red Hat system:</p>
<pre>$ <strong>lsmod | grep ip</strong>
ipv6                  410913  36</pre>
<p>If <strong>lsmod </strong>doesn't return anything, it confirms that your system isn't running IPv6.</p>
<h3>Prevent IPv6 from getting started by modprobe</h3>
<p>As you probably know, modprobe command is used for probing modules upon system boot. Probing simply means a module is loaded and an attempt is made to start it up. With any luck, the module starts successfully and its functionality becomes available to the Linux kernel.</p>
<p>For the boot stage, modprobe uses a special config file which helps you control its behavior: <strong>/etc/modprobe.conf</strong>. For now, let's just concentrate on the <strong>IPv6</strong> task at hand. To make sure modprobe doesn't load the actual module next time your OS reboots, add the following line to the top of the <strong>/etc/modprobe.con</strong>f file (yes, you're going to need root privileges for this):</p>
<pre>install ipv6 /bin/true</pre>
<p><strong>WHY THIS WORKS</strong>: just to quickly explain the line above, here's why we're using the <strong>/bin/true</strong> command. install is rule of the modprobe config file which overrides the standard way of probing a module. Effectively, it tells modprobe to just run the specified command for starting a module. In the line above, we're telling modprobe to use the <strong>/bin/true</strong> command for probing the <strong>ipv6 </strong>module. And as you remember, <strong>/bin/true</strong> is a command which doesn't do anything but still returns a successful completion code &#8211; so in effect we're doing nothing instead of loading the <strong>ipv6 </strong>module, and we're looking good while doing this too.</p>
<p>Next, add the the following two lines to the same <strong>/etc/modprobe.conf</strong> file, and they will ensure that common aliases used for starting the <strong>IPv6 </strong>module are ignored by modprobe:</p>
<pre>alias net-pf-10 off
alias ipv6 off</pre>
<p><strong>IMPORTANT</strong>: These change doesn't immediately disable <strong>IPv6 </strong>on your system. Being a pretty important module, IPv6 isn't easy to disable on a live system, and so the easiest is to always follow the changes above with a reboot.</p>
<h3>Make sure your IPv6 firewall is disabled</h3>
<p>The <strong>ip6tables </strong>service (<strong>/etc/init.d/ip6tables</strong> sciprt) is responsible for starting <strong>IPv6 </strong>firewall, and so you probably want to disable it:</p>
<pre># <strong>chkconfig ip6tables off</strong></pre>
<p>and then confirm that it won't be started next time you reboot or switch to any runlevel:</p>
<pre># <strong>chkconfig --list ip6tables</strong>
ip6tables       0:off   1:off   2:off   3:off   4:off   5:off   6:off</pre>
<p>That's it, there really is nothing else to disabling <strong>IPv6</strong>. Let me know if you have any questions, otherwise I'll talk to you soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/12/how-to-disable-ipv6-in-red-hat-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu SSH: How To Enable Secure Shell in Ubuntu</title>
		<link>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/</link>
		<comments>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/#comments</comments>
		<pubDate>Fri, 15 May 2009 15:38:54 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh server]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=566</guid>
		<description><![CDATA[SSH (Secure SHell) is possibly the best way to remotely access a Unix system &#8211; it's very secure thanks to automatic encryption of all the traffic, and it's also quite universal because you can do all sorts of things: access remote command line shell, forward graphics session output, establish network tunnels and set up port [...]]]></description>
			<content:encoded><![CDATA[<p><strong>SSH </strong>(<strong>Secure SHell</strong>) is possibly the best way to remotely access a Unix system &#8211; it's very secure thanks to automatic encryption of all the traffic, and it's also quite universal because you can do all sorts of things: access remote command line shell, forward graphics session output, establish network tunnels and set up port redirections. Today I'm going to show you how to get started with SSH in <strong>Ubuntu</strong>.</p>
<h3>Installing SSH server in Ubuntu</h3>
<p>By default, your system will have no SSH service enabled, which means you won't be able to connect to it remotely using SSH protocol (TCP port 22). This means that installing SSH server will be one of the first post-install steps on your system.</p>
<p>The most common SSH implementation is <a href="http://www.openssh.org"><strong>OpenSSH</strong></a> server, and that's exactly what you want to install.</p>
<p>Log in with your standard username and password, and run the following command to install openssh-server. You should be using the same username that you specified when installing Ubuntu, as it will be the only account with sudo privileges to run commands as root:</p>
<pre>ubuntu$ <strong>sudo apt-get install openssh-server
</strong>[sudo] password for greys:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  rssh molly-guard openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
  openssh-server
0 upgraded, 1 newly installed, 0 to remove and 75 not upgraded.
Need to get 285kB of archives.
After this operation, 782kB of additional disk space will be used.
Get:1 http://ie.archive.ubuntu.com jaunty/main openssh-server 1:5.1p1-5ubuntu1 [
285kB]
Fetched 285kB in 0s (345kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 101998 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.1p1-5ubuntu1_i386.deb) .
..
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.1p1-5ubuntu1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
 * Restarting OpenBSD Secure Shell server sshd                           [ OK ]</pre>
<h3>Verifying your SSH server works</h3>
<p>While you're still on your local desktop session, you can use the ps command to confirm that SSH daemon (<strong>sshd</strong>) is running:</p>
<pre>ubuntu$ <strong>ps -aef | grep sshd
</strong>root     24114     1  0 15:18 ?        00:00:00 /usr/sbin/sshd</pre>
<p>Now that you see it's there, it's time to try connecting:</p>
<pre>ubuntu$ <strong>ssh localhost</strong></pre>
<p>Since this is the first time you're trying to connect using SSH, you'll have to answer yes to the following question:</p>
<pre>The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 18:4d:96:b3:0d:25:00:c8:a1:a3:84:5c:9f:1c:0d:a5.
Are you sure you want to continue connecting (yes/no)? yes</pre>
<p>&#8230; you'll then be prompted for your own password (remember, the system treats such connection request as if you were connecting remotely, so it can't trust you without confirming your password):</p>
<pre>Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
greys@localhost's password:</pre>
<p>.. and finally you'll see the usual Ubuntu (Jaunty in this example) banner and prompt:</p>
<pre>Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

Last login: Fri May 15 15:18:34 2009 from ubuntu
ubuntu$</pre>
<p>That's it, providing you have your networking configured and you know your IP address or hostname, you can start connecting to your Ubuntu box from remote systems, using the same command.  Enjoy!</p>
<h3>See also:</h3>
<ul>
<li><strong><a href="http://www.unixtutorial.org/commands">Unix commands</a></strong></li>
<li><strong><a title="apt-get behind proxy" href="http://www.unixtutorial.org/2007/09/how-to-use-apt-get-behind-proxy/">Using apt-get behind proxy</a></strong></li>
<li><strong><a title="list packages in Ubuntu" href="http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/">List installed packages in Ubuntu</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Confirm if Your CPU is 32bit or 64bit</title>
		<link>http://www.unixtutorial.org/2009/05/how-to-confirm-if-your-cpu-is-32bit-or-64bit/</link>
		<comments>http://www.unixtutorial.org/2009/05/how-to-confirm-if-your-cpu-is-32bit-or-64bit/#comments</comments>
		<pubDate>Fri, 08 May 2009 08:03:49 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[cpuinfo]]></category>
		<category><![CDATA[uname]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=549</guid>
		<description><![CDATA[I had to download a piece of software today for one of the servers which I haven't used in a while. A question of confirming the 64bit CPU capability came up, and I realized that I never mentioned it here on Unix Tutorial.
Some of you probably remember the uname command which also shows you similar [...]]]></description>
			<content:encoded><![CDATA[<p>I had to download a piece of software today for one of the servers which I haven't used in a while. A question of confirming the 64bit CPU capability came up, and I realized that I never mentioned it here on <a title="Unix Tutorials" href="http://www.unixtutorial.org"><strong>Unix Tutorial</strong></a>.</p>
<p>Some of you probably remember the <a title="uname command" href="http://www.unixtutorial.org/uname"><strong>uname command</strong></a> which also shows you similar information, but <strong>uname </strong>confirms the running kernel of your OS and not the CPU capability: if you're booted into 32bit mode, it will not help you to recognize the 64bit potential of your system.</p>
<h3>Obtaining CPU information from /proc/cpuinfo</h3>
<p>Most Linux distros will have the special <strong>/proc/cpuinfo</strong> file which contains a textual description of all the features your processors have. This is a very useful file &#8211; depending on your task it may help you identify any features of your processors, as well as confirm the overall number of CPUs your system has installed.</p>
<p>Most commonly, the following information is obtained from <strong>/proc/cpuinfo</strong>:</p>
<ul>
<li>processor model name and type</li>
<li>processor speed in Mhz</li>
<li>processor cache size</li>
<li>instruction flags supported by CPU</li>
</ul>
<p>Here's how the typical output will look:</p>
<pre>processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :                   Intel(R) Xeon(TM) CPU 3.20GHz
stepping        : 3
cpu MHz         : 3192.320
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts
acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
bogomips        : 6388.78
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:</pre>
<p>The same block of information will be shown for each CPU visible to your system. There will be 2 processor instances for each physical CPU if hyper-treading is enabled, and there will be 2 or 4 processor entries for each physical CPU on dual- and quad-core systems configurations.</p>
<h3>How to confirm the 64bit capability of your CPU in Linux</h3>
<p>Based on<strong> /proc/cpuinfo</strong> file, it is quite easy to confirm whether your CPU is capable of 64bit or not. All you have to do is look at the flags which tell you what instruction sets your CPU is capable of.</p>
<p>All  the CPUs on your system will have the same type and therefore support the same instruction sets, that's why in this example the grep command returns 4 similar lines &#8211; for the 4 CPU instances found on my system:</p>
<pre>newserver# <strong>grep flags /proc/cpuinfo</strong>
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr</pre>
<p>What you're looking for is the following flag: <strong>lm</strong>. It stands for <strong>X86_FEATURE_LM</strong>, the Long Mode (64bit) support. If you can find the "<strong>lm</strong>" flag among your CPU flags, this means you're looking at a 64bit capable processor.</p>
<p>As you can see from the example about, the processors in question are 64bit capable.</p>
<p>And this is how <strong>/proc/cpuinfo</strong> will look on an older system with only 32bit capable CPUs, there's no lm flag as you can see:</p>
<pre>oldserver# <strong>grep flags /proc/cpuinfo</strong>
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm</pre>
<p>That's it, hope this little tip helps you next time you're puzzled about your CPU capabilities!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="32bit deb on 64bit system" href="http://www.unixtutorial.org/2008/03/install-32-bit-deb-packages-on-64-bit/">How to install and run 32bit packages on 64bit Debian system</a></strong></li>
<li><strong><a title="uname - useful information about your Unix system" href="http://www.unixtutorial.org/commands/uname/">Confirming whether you're using a 64bit OS</a></strong></li>
<li><strong><a title="Unix Glossary" href="http://www.unixtutorial.org/glossary">Unix Glossary</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/05/how-to-confirm-if-your-cpu-is-32bit-or-64bit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Use /proc/version to identify your Linux release</title>
		<link>http://www.unixtutorial.org/2009/04/use-proc-version-to-identify-your-linux-release/</link>
		<comments>http://www.unixtutorial.org/2009/04/use-proc-version-to-identify-your-linux-release/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 09:30:58 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=531</guid>
		<description><![CDATA[Hi everyone, I'm finally back from my holidays, and simply cannot wait to share some more Unix tips with all of you!
Today I'll talk a bit more about yet another way of learning version information about your Linux OS: the /proc/version file. I mentioned it briefly in one of the previous posts, but would like [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone, I'm finally back from my holidays, and simply cannot wait to share some more Unix tips with all of you!</p>
<p>Today I'll talk a bit more about yet another way of learning version information about your Linux OS: the <strong>/proc/version</strong> file. I mentioned it briefly in one of the previous posts, but would like to finish the explanations.</p>
<h3>What you can learn from /proc/version</h3>
<p>This file will not show you the name of the actual OS release, but will instead give you specifics about the version of Linux kernel used in your distribution, and confirm the version of a GCC compiler used to build it.</p>
<p>If you cat the <strong>/proc/version</strong> file, this is what you're going to see (I'm using a RedHat 5.2 system for this):</p>
<pre>rhel52# <strong>cat /proc/version</strong>
Linux version 2.6.18-92.el5 (brewbuilder@ls20-bc2-13.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-41)) #1 SMP Tue Apr 29 13:16:15 EDT 2008</pre>
<p>In this output, you get to see the following information:</p>
<ol>
<li>Exact version of the Linux kernel used in your OS: <strong>Linux version 2.6.18-92.el5</strong></li>
<li>Name of the user who compiled your kernel, and also a host name where it happened: <strong>brewbuilder@ls20-bc2-13.build.redhat.com</strong></li>
<li>Version of the GCC compiler used for building the kernel: <strong>gcc version 4.1.2 20071124</strong></li>
<li>Type of the kernel &#8211; <a title="SMP" href="http://www.unixtutorial.org/glossary/#smp"><strong>SMP</strong></a> here means Symmetric MultiProcessing kernel, the one that supports systems with multiple CPUs or multiple cpu cores</li>
<li>Date and time when the kernel was built: <strong>Tue Apr 29 13:16:15 EDT 2008</strong></li>
</ol>
<p>It's absolutely normal that the kernel is older than the overall release of yours. My example above, generated on the RedHat Enterprise Linux 5.2 system (RHEL5.2), shows the kernel birthday to be <em><strong>Apr 29, 2008</strong></em>. But the actual RHEL5.2 release became available to all the customers only a month later, on <em><strong>May 21st 2008</strong></em> (here's the original <a href="http://press.redhat.com/2008/05/21/red-hat-enterprise-linux-52/">RedHat 5.2 announcement</a>).</p>
<p>The reason your kernel is a bit older than the rest of the distribution is because kernel is only one part of the final product you're getting &#8211; it may take a while to compile and integrate the rest of the OS before it can be used.</p>
<h3>Different ways to find out Linux release information</h3>
<p>By now, you should know quite a few ways of confirming release information about your Linux distro. Just to remind you, here they are:</p>
<ul>
<li><strong><a title="release of linux" href="http://www.unixtutorial.org/2007/08/how-to-find-out-the-release-version-of-your-unix/">use /etc/redhat-release or /etc/SuSE-release (/etc/issue for Ubuntu)</a></strong></li>
<li><strong><a title="uname kernel" href="http://www.unixtutorial.org/2007/12/find-redhat-version/">uname helps you identify if you're using a 32bit or 64bit kernel</a></strong></li>
<li><strong><a title="lsb release linux" href="http://www.unixtutorial.org/2008/03/find-out-linux-version-using-lsb/">lsb_release command shows you release information as per LSB specification</a></strong></li>
</ul>
<p>This should be more than enough even for the most curious Linux users. Enjoy!</p>
<h3>See also:</h3>
<ul>
<li><strong><a href="http://www.unixtutorial.org/glossary">Unix glossary</a></strong></li>
<li><strong><a title="gcc compiler version" href="http://www.unixtutorial.org/2008/01/find-compiler-version/">Finding out your GCC compiler version</a></strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/04/use-proc-version-to-identify-your-linux-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Monitor Linux Memory Usage with Watch Command</title>
		<link>http://www.unixtutorial.org/2009/02/monitor-linux-memory-usage-with-watch-command/</link>
		<comments>http://www.unixtutorial.org/2009/02/monitor-linux-memory-usage-with-watch-command/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 09:58:16 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[meminfo]]></category>
		<category><![CDATA[physical memory]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=444</guid>
		<description><![CDATA[Hi all, today I'm going to teach you not one, but two really cool things in one post! First, I'll introduce you to advanced memory usage stats available on Linux systems through /proc/meminfo file, and then I'll explain the basics of using the watch command.
Memory usage with /proc/meminfo
As you know, quite a few Unix-like systems [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all, today I'm going to teach you not one, but two really cool things in one post! First, I'll introduce you to advanced memory usage stats available on Linux systems through <strong>/proc/meminfo</strong> file, and then I'll explain the basics of using the <strong>watch </strong>command.</p>
<h3>Memory usage with /proc/meminfo</h3>
<p>As you know, quite a few Unix-like systems use the so-called pseudo file systems like <strong>/proc</strong>. It's not a real filesystem, but just a convenient representation of processes managed by your Unix OS. In Linux systems, this directory also contains quite a few files allowing you to access various information about your system. <strong>/proc/meminfo</strong> is one of such files, it gives you access to most of the memory usage stats.</p>
<p>To get a snapshot of the current state of memory usage on your Linux system, simply cat the <strong>/proc/meminfo</strong> file:</p>
<pre>ubuntu$ <strong>cat /proc/meminfo</strong>
MemTotal:       523008 kB
MemFree:         35336 kB
Buffers:         85560 kB
Cached:         137220 kB
SwapCached:      24480 kB
Active:         327420 kB
Inactive:        91308 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       523008 kB
LowFree:         35336 kB
SwapTotal:     1048568 kB
SwapFree:       998960 kB
Dirty:             504 kB
Writeback:           0 kB
Mapped:         212232 kB
Slab:            39140 kB
CommitLimit:   1310072 kB
Committed_AS:   655992 kB
PageTables:       4748 kB
VmallocTotal: 34359738367 kB
VmallocUsed:       628 kB
VmallocChunk: 34359737739 kB</pre>
<p>This probably gives you more information about memory usage that you'll ever want to know, but there's quite a few really useful stats there like the MemFree or SwapFree ones, they're useful for making sure your OS environment is healthy enough in terms of having plenty of free memory for efficient operation.</p>
<h3>Using watch command to track progress</h3>
<p><strong>watch command</strong> is a really neat tool which does a simple but incredibly useful thing: it repeatedly runs a given command line and shows you the output. So, you're effectively monitoring a progress of some process by watching relevant files.</p>
<p>The default interval is 2, which gives enough dynamics for most of the needs.</p>
<p>Here's how you use this command:</p>
<pre>ubuntu$ <strong>watch cat /proc/meminfo</strong></pre>
<p>So it's the same command we used in previous example, <strong>cat /proc/meminfo</strong>, but this time we're asking the <strong>watch command</strong> to re-run the command every 2 seconds and show us the output.</p>
<p>The result of running a watch command is going to be a constantly refreshed console showing something like this:</p>
<pre>Every 2.0s: cat /proc/meminfo       Fri Feb 13 03:51:01 2009

MemTotal:       523008 kB
MemFree:         46396 kB
Buffers:         82636 kB
Cached:         131044 kB
SwapCached:      24480 kB
Active:         308512 kB
Inactive:        99372 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       523008 kB
LowFree:         46396 kB
SwapTotal:     1048568 kB
SwapFree:       998960 kB
Dirty:             832 kB
Writeback:           0 kB
Mapped:         211076 kB
Slab:            39132 kB
CommitLimit:   1310072 kB
Committed_AS:   654860 kB
PageTables:       4856 kB
VmallocTotal: 34359738367 kB
VmallocUsed:       628 kB
VmallocChunk: 34359737739 kB</pre>
<p>This output gets refreshed every 2 seconds, so the numbers shown are constantly updated.</p>
<p>That's it for today! There are limitless possibilities for monitoring various processes using <strong>watch command</strong> and I'll be sure to cover them in the future, but for now &#8211; have a great weekend and hope Friday 13th turns out great!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="Memory size in Linux" href="http://www.unixtutorial.org/2008/06/physical-memory-size-in-linux/">How to determine physical memory size in Linux</a></strong></li>
<li><strong><a title="Unix file types" href="http://www.unixtutorial.org/2007/09/unix-file-types/">Unix file types</a></strong></li>
<li><strong><a title="Glossary of Unix" href="http://www.unixtutorial.org/glossary">Unix glossary</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/02/monitor-linux-memory-usage-with-watch-command/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To Change Ownership of Files and Directories in Unix</title>
		<link>http://www.unixtutorial.org/2009/02/how-to-change-ownership-of-files-and-directories-in-unix/</link>
		<comments>http://www.unixtutorial.org/2009/02/how-to-change-ownership-of-files-and-directories-in-unix/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 10:21:13 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[file ownership]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=439</guid>
		<description><![CDATA[I've just been asked a question about changing the ownership of files from one Unix user to another, and thought it probably makes sense to have a quick post on it.
File ownership in Unix
Just to give you a quick reminder, I'd like to confirm that every single file in Unix belongs to some user and [...]]]></description>
			<content:encoded><![CDATA[<p>I've just been asked a question about changing the ownership of files from one Unix user to another, and thought it probably makes sense to have a quick post on it.</p>
<h3>File ownership in Unix</h3>
<p>Just to give you a quick reminder, I'd like to confirm that every single file in Unix belongs to some user and some group. There simply isn't a way to create a file without assigning ownership. I've briefly touched the topic of <a title="find the owner of a file" href="http://www.unixtutorial.org/2008/03/how-to-find-the-owner-of-a-file-in-unix/">confirming file ownership in Unix</a> before, so today I will simply build on that and show you how to change ownership of files.</p>
<p>Here's a setup for today: I have created a temporary directory with a few files and made myself the owner of all the files:</p>
<pre>ubuntu$ <strong>ls -al /home/greys/example/</strong>
total 12
drwxr-xr-x  3 greys admin 4096 Feb  9 03:55 .
drwxr-xr-x 13 greys greys 4096 Feb  9 03:54 ..
drwxr-xr-x  2 greys admin 4096 Feb  9 03:55 dir1
-rw-r--r--  1 greys admin    0 Feb  9 03:54 file1
-rw-r--r--  1 greys admin    0 Feb  9 03:55 file2</pre>
<p>As you can see from this listing, the owner (third field in each line) is my username &#8211; <strong>greys</strong>. The next field is a Unix group of each file's owner &#8211; <strong>admin </strong>in my example.</p>
<h3>Changing owner of a file in Unix</h3>
<p>Changing file ownership means only updating the association between a Unix user and a file, and nothing else. When you're changing the owner of a file, no data contained in a file is changed.</p>
<p>To change the owner of a file, you need to use the <strong>chown command</strong> (easy enough to remember: CHange OWNer &#8211; <strong>chown</strong>), with the following syntax:</p>
<pre>ubuntu$ <strong>chown nobody file1</strong></pre>
<p>In this command, <strong>nobody </strong>is the username of the new owner for a list of files. In my example, the only file we'd like to change ownership for is <strong>file1</strong>.</p>
<p>It is important to realize that you can only change file ownership as a super-user (root). Any regular Unix user cannot change the ownership of any file, and I'd like to explain why.</p>
<p>Indeed, some people are surprised: if I'm the owner of a given file, why can't I change the ownership for it? That's because transferring the ownership will mean some other Unix user will become the owner of the file(s) in question. So changing ownership is like making a decision not only for yourself, but for the new owner of the files.This is only something a super-user &#8211; special administrative account in Unix &#8211; can do.</p>
<p>The same logic applies to other people not being able to become owners of your files, even if they're willing to assume the new responsibilities of owning files. They cannot revoke your ownership, because each Unix user is only allowed to make decisions and take actions on his/her own behalf.</p>
<p>That's why you will probably see an error like this if you attempt to change ownership of a file as your own regular Unix user:</p>
<pre>ubuntu$ <strong>id</strong>
uid=1000(greys) gid=113(admin) groups=33(www-data),113(admin)
ubuntu$ <strong>chown nobody file1</strong>
chown: changing ownership of `file1': Operation not permitted</pre>
<p>But if we become root:</p>
<pre>ubuntu$ <strong>sudo -i</strong>
[sudo] password for greys:
ubuntu#</pre>
<p>&#8230; we'll have no problem changing owners for any files:</p>
<pre>ubuntu# <strong>cd /home/greys/example</strong>
ubuntu# <strong>chown nobody file1</strong>
ubuntu# <strong>ls -l file1</strong>
-rw-r--r-- 1 nobody admin 0 Feb  9 03:54 file1</pre>
<h3>Changing owner for multiple files</h3>
<p>If you're going to change owner of a few files, this can easily be done using either a full list of files or a mask.</p>
<p>First, here's an example of updating ownership for a specified list of files (and as you can see, directories as well):</p>
<pre>ubuntu# <strong>chown nobody file2 dir1</strong>
ubuntu# <strong>ls -al</strong>
total 12
drwxr-xr-x  3 greys  admin 4096 Feb  9 03:55 .
drwxr-xr-x 13 greys  greys 4096 Feb  9 03:54 ..
drwxr-xr-x  2 nobody admin 4096 Feb  9 03:55 dir1
-rw-r--r--  1 nobody admin    0 Feb  9 03:54 file1
-rw-r--r--  1 nobody admin    0 Feb  9 03:55 file2</pre>
<p><strong>IMPORTANT:</strong> here's one thing which is often forgotten: when you're changing an owner of a directory, this DOES NOT automatically change owner of all the files which already exist in this directory. So, if we check the file3 in dir1 after the example above, we can see that even though dir1 now belongs to user nobody, file3 in it still belongs to me:</p>
<pre>ubuntu# <strong>ls -l dir1/file3</strong>
-rw-r--r-- 1 greys admin 0 Feb  9 03:55 dir1/file3</pre>
<p>If your intention is to change ownership of all the files and directories of a certain location in your filesystem, you need to use a <strong>-R</strong> option of the <strong>chown command</strong>, which means recursive ownership change:</p>
<pre>ubuntu# <strong>chown -R nobody dir1</strong>
ubuntu# <strong>ls -l dir1/file3</strong>
-rw-r--r-- 1 nobody admin 0 Feb  9 03:55 dir1/file3</pre>
<p>And just to further demonstrate this, I'm going to change owner of all the files and directories in <strong>/home/greys/example</strong> directory back to my own username, <strong>greys</strong>:</p>
<pre>ubuntu# chown -R greys /home/greys/example/
ubuntu# ls -l /home/greys/example/
total 4
drwxr-xr-x 2 greys admin 4096 Feb  9 03:55 dir1
-rw-r--r-- 1 greys admin    0 Feb  9 03:54 file1
-rw-r--r-- 1 greys admin    0 Feb  9 03:55 file2</pre>
<p>That's it for today, good luck with changing file owners on your Unix system!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="Owner of a file in Unix" href="http://www.unixtutorial.org/2008/03/how-to-find-the-owner-of-a-file-in-unix/">Finding the owner of a file in Unix</a></strong></li>
<li><strong><a title="find files of a certain user" href="http://www.unixtutorial.org/2008/06/find-files-which-belong-to-a-user-or-unix-group/">Find files which belong to a given Unix user</a></strong></li>
<li><strong><a title="user id instead of username" href="http://www.unixtutorial.org/2009/01/what-to-do-if-numeric-id-is-shown-instead-of-unix-username/">What to do when numeric user id is shown instead of username</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/02/how-to-change-ownership-of-files-and-directories-in-unix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu Upgrade: From Hardy Heron to Intrepid Ibex</title>
		<link>http://www.unixtutorial.org/2009/01/ubuntu-upgrade-from-hardy-heron-to-intrepid-ibex/</link>
		<comments>http://www.unixtutorial.org/2009/01/ubuntu-upgrade-from-hardy-heron-to-intrepid-ibex/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 13:44:03 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Advanced topics]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[intrepid]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=401</guid>
		<description><![CDATA[I've been upgrading Ubuntu installations quite a few times recently, and thought it makes sense to post a really short how-to if you ever want to upgrade your Ubuntu distro from the command line.
Use apt-get to upgrade Ubuntu
The procedure for upgrading one Ubuntu release to another one is pretty straightforward. There are some rules though:

Never [...]]]></description>
			<content:encoded><![CDATA[<p>I've been upgrading Ubuntu installations quite a few times recently, and thought it makes sense to post a really short how-to if you ever want to upgrade your Ubuntu distro from the command line.</p>
<h3>Use apt-get to upgrade Ubuntu</h3>
<p>The procedure for upgrading one Ubuntu release to another one is pretty straightforward. There are some rules though:</p>
<ol>
<li>Never attempt to skip a release or two when upgrading</li>
<li>Never do a few Ubuntu release upgrades in a row without reboots in between</li>
<li>Always backup the files you change</li>
<li>Always have an install CD for your current Ubuntu release around</li>
</ol>
<h3>Upgrading Ubuntu: step by step procedure</h3>
<p>There are a few steps involved in every Ubuntu upgrade:</p>
<h4>1. Confirm your existing Ubuntu release <strong></strong></h4>
<p><strong>/etc/lsb-release</strong> file will help you determine the current <a title="Ubuntu releases" href="http://www.unixtutorial.org/reference/ubuntu-releases-and-codenames/">Ubuntu release</a> you have. In my example, that's what it was:</p>
<pre>ubuntu# <strong>cat /etc/lsb-release</strong>
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.1"</pre>
<h4>2. Change the /etc/apt/sources.list file</h4>
<p>This is the file which holds a list of all the repositories to be used by <strong>apt-get command</strong> (and the rest of the apt commands) to manage packages on your Ubuntu system. It usually looks like this (note how I use grep to ignore the comment lines in the file thus only showing the content that's of interest to us):</p>
<pre>ubuntu# <strong>cat /etc/apt/sources.list | grep -v ^#</strong>
deb http://ie.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy main restricted
deb http://ie.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb http://ie.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy universe
deb http://ie.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb http://ie.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://ie.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
...</pre>
<p>Each line contains a URL of a certain repository and then the <a title="Ubuntu codenames" href="http://www.unixtutorial.org/reference/ubuntu-releases-and-codenames/"><strong>Ubuntu release codename</strong></a> and a type of the repository. Without going into details today, I'll just concentrate on the release codename: "<strong>hardy</strong>" in this example.</p>
<p>What these commands do is confirm that for any updates apt-get should be consulting the specified repositories. In order to upgrade your distribution, we need to change the Ubuntu release codename to the one of the next release &#8211; for Intrepid Ibex (Ubuntu 8.10) it's "<strong>intrepid</strong>".</p>
<p>First, make a copy of the existing <strong>/etc/apt/sources.list</strong>, and then use sed to generate a new file with <strong>hardy </strong>replaced by <strong>intrepid</strong>:</p>
<pre>ubuntu# <strong>cp /etc /apt/apt/sources.list /etc/apt/sources.list.hardy</strong>
ubuntu# <strong>cat /etc/apt/sources.list.hardy | grep -v ^#</strong>
ubuntu# <strong>cat /etc/apt/sources.list.hardy | sed s/hardy/intrepid/g &gt; /etc/apt/sources.list</strong></pre>
<h4>3. Use apt-get update command to update the packages list</h4>
<p>Now that we have specified the Intrepid Ibex release codename in <strong>/etc/apt/sources.list</strong>, it's time to make apt-get recognize this by contacting all the repositories mentioned in the file and downloading lists of new packages available from all of them. apt-get maintains  a list of available packages in its own database, and that's how yout get it to refresh:</p>
<pre>ubuntu# <strong>apt-get update</strong>
0% [Working]

Get:1 http://security.ubuntu.com intrepid-security Release.gpg [189B]
Ign http://security.ubuntu.com intrepid-security/main Translation-en_IE
Ign http://security.ubuntu.com intrepid-security/restricted Translation-en_IE
Get:2 http://ie.archive.ubuntu.com intrepid Release.gpg [189B]
...</pre>
<p>It's going to be quite a long list of newly downloaded lists from all the repositories.</p>
<h4>4. Use apt-get dist-upgrade to upgrade your Ubuntu release</h4>
<p>We're now ready to upgrade your Ubuntu, it will take just one more command and a few hundred megabytes of a download. Once you see this output, simply answer "y" to the question and leave your Ubuntu alone for about an hour to complete the downloads and update all the packages:</p>
<pre>ubuntu# <strong>apt-get updatedist-upgrade</strong>
Reading package lists... 0%
Reading package lists... 100%
Reading package lists... Done

Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree       

Reading state information... 0%
Reading state information... 10%
Reading state information... Done

Calculating upgrade... Done

The following packages will be REMOVED:
  console-tools gimp-gnomevfs gimp-python gtk2-engines-ubuntulooks gtkhtml3.14 libchromexvmc1 libchromexvmcpro1
  libffi4 libgail-common libgail18 libgmime-2.0-2 libgnomekbd2 libgnomekbdui2 libperl5.8 myspell-en-us
  xserver-xorg-video-cyrix xserver-xorg-video-imstt xserver-xorg-video-newport xserver-xorg-video-psb
  xserver-xorg-video-via
The following NEW packages will be installed:
  bluetooth bluez compiz-wrapper cpp-4.3 cups cups-bsd cups-client cups-common cups-driver-gutenprint
  firefox-3.0-branding gcc-4.3 gcc-4.3-base gdm-guest-session gstreamer0.10-schroedinger guile-1.8-libs gvfs-bin
  hunspell-en-us kbd landscape-common libapparmor-perl libapparmor1 libasound2-plugins libavahi-gobject0
  libbabl-0.0-0 libbind9-40 libbluetooth3 libcamel1.2-14 libcanberra-gnome libcanberra-gtk0 libcanberra0 libcap2
  libcryptui0 libcups2 libdb4.7 libdjvulibre21 libdns43 libebackend1.2-0 libedataserver1.2-11 libelf1 libept0
  libffi5 libgdiplus libgegl-0.0-0 libgif4 libglitz-glx1 libglitz1 libgmime-2.0-2a libgmp3c2 libgnome-desktop-2-7
  libgnome-keyring1.0-cil libgnomekbd3 libgnomekbdui3 libgnutls26 libgp11-0 libgpm2 libgtkglext1
  libgtkhtml-editor-common libgtkhtml-editor0 libgucharmap7 libhunspell-1.2-0 libhyphen0 libijs-0.35 libilmbase6
  libisc44 libisccc40 libisccfg40 libltdl7 liblwres40 libmldbm-perl libmpfr1ldbl libmtp8 libntfs-3g28 libopenal1
  libopenexr6 libpam-ck-connector libpangomm-1.4-1 libparted1.8-9 libpci3 libpciaccess0 libpcsclite1 libperl5.10
  libpoppler-glib3 libpoppler3 libschroedinger-1.0-0 libsilc-1.1-2 libsmbios2 libspectre1 libspeexdsp1 libtalloc1
  libtotem-plparser12 libts-0.0-0 libuuid-perl libv4l-0 libwbclient0 libxapian15 libxcb-render-util0
  libxcb-render0 linux-firmware linux-headers-2.6.27-9 linux-headers-2.6.27-9-generic
  linux-image-2.6.27-9-generic linux-restricted-modules-2.6.27-9-generic myspell-en-au openoffice.org-math
  openssl-blacklist python-cupshelpers python-pexpect python-pkg-resources python-pycurl python-rdflib
  python-smartpm python-twisted-bin python-twisted-core python-twisted-web python-usb python-xkit
  python-zopeinterface syslinux sysvinit-utils ubuntu-system-service update-motd usb-creator xinput
  xserver-common xserver-xorg-video-mach64 xserver-xorg-video-r128 xserver-xorg-video-radeon
The following packages have been kept back:
  ubuntu-desktop
The following packages will be upgraded:
  acl acpi acpi-support acpid adduser alacarte alsa-base alsa-utils anacron apmd app-install-data
  app-install-data-commercial apparmor apparmor-utils apport apport-gtk apt apt-utils aptitude apturl aspell at
  at-spi avahi-autoipd avahi-daemon base-files base-passwd bash bash-completion belocs-locales-bin bind9-host
  binutils binutils-static bluez-cups bluez-gnome bluez-utils bogofilter bogofilter-bdb bogofilter-common brasero
  brltty brltty-x11 bsdutils bug-buddy busybox-initramfs bzip2 ca-certificates capplets-data cdparanoia cdrdao
  cli-common command-not-found command-not-found-data compiz compiz-core compiz-fusion-plugins-extra
  compiz-fusion-plugins-main compiz-gnome compiz-plugins compizconfig-backend-gconf console-setup
  console-terminus consolekit contact-lookup-applet coreutils cpio cpp cpp-4.2 cron cups-pdf cupsddk
  cupsddk-drivers cupsys cupsys-bsd cupsys-client cupsys-common cupsys-driver-gutenprint dash dbus dbus-x11
  debconf debconf-i18n debianutils defoma deskbar-applet desktop-file-utils dhcp3-client dhcp3-common
  dictionaries-common dnsutils doc-base dosfstools dpkg dvd+rw-tools e2fslibs e2fsprogs eject ekiga eog
  esound-common espeak espeak-data ethtool evince evolution evolution-common evolution-data-server
  evolution-data-server-common evolution-exchange evolution-plugins evolution-webcal example-content f-spot
  fast-user-switch-applet fdutils file file-roller findutils finger firefox firefox-3.0 firefox-3.0-gnome-support
  firefox-gnome-support fontconfig fontconfig-config foo2zjs foomatic-db foomatic-db-engine foomatic-db-hpijs
  foomatic-filters fortune-mod fortunes-min freeglut3 friendly-recovery ftp fuse-utils gcalctool gcc gcc-4.2
  gcc-4.2-base gconf-editor gconf2 gconf2-common gdb gdebi gdebi-core gdm gedit gedit-common genisoimage
  gettext-base ghostscript ghostscript-x gimp gimp-data gimp-help-common gimp-help-en gnome-about
  gnome-accessibility-themes gnome-app-install gnome-applets gnome-applets-data gnome-cards-data
  gnome-control-center gnome-desktop-data gnome-doc-utils gnome-games gnome-games-data gnome-icon-theme
  gnome-keyring gnome-mag gnome-media gnome-media-common gnome-menus gnome-mount gnome-netstatus-applet
  gnome-nettool gnome-orca gnome-panel gnome-panel-data gnome-pilot gnome-pilot-conduits gnome-power-manager
  gnome-screensaver gnome-session gnome-settings-daemon gnome-spell gnome-system-monitor gnome-system-tools
  gnome-terminal gnome-terminal-data gnome-themes gnome-user-guide gnome-utils gnome-volume-manager gnupg gpgv
  grep groff-base grub gsfonts gstreamer0.10-alsa gstreamer0.10-gnomevfs gstreamer0.10-plugins-base
  gstreamer0.10-plugins-base-apps gstreamer0.10-plugins-good gstreamer0.10-pulseaudio gstreamer0.10-tools
  gstreamer0.10-x gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf gucharmap guile-1.6-libs gvfs
  gvfs-backends gvfs-fuse gzip hal hal-cups-utils hal-info hdparm hostname hotkey-setup hpijs hplip hplip-data
  human-icon-theme human-theme ifupdown initramfs-tools initscripts iproute iptables iso-codes jockey-common
  jockey-gtk klibc-utils klogd landscape-client language-pack-en language-pack-en-base language-pack-gnome-en
  language-pack-gnome-en-base language-selector language-selector-common language-support-en
  language-support-translations-en language-support-writing-en laptop-detect laptop-mode-tools
  launchpad-integration lftp libaa1 libacl1 libalut0 libao2 libapm1 libarchive1 libart-2.0-2 libart2.0-cil
  libasound2 libaspell15 libatk1.0-0 libatm1 libatspi1.0-0 libattr1 libavahi-client3 libavahi-common-data
  libavahi-common3 libavahi-compat-libdnssd1 libavahi-core5 libavahi-glib1 libavahi-ui0 libbeagle1 libblkid1
  libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libbrlapi0.5 libbz2-1.0 libc6 libc6-i686
  libcaca0 libcairo-perl libcairo2 libcairomm-1.0-1 libcdio-cdda0 libcdio-paranoia0 libcdio7 libcdparanoia0
  libck-connector0 libcomerr2 libcompizconfig0 libconsole libcroco3 libcucul0 libcupsimage2 libcupsys2 libcurl3
  libcurl3-gnutls libcwidget3 libdaemon0 libdatrie0 libdb4.6 libdbus-1-3 libdbus-glib-1-2 libdecoration0
  libdeskbar-tracker libdevmapper1.02.1 libdirectfb-1.0-0 libdmx1 libdrm2 libdv4 libebook1.2-9 libecal1.2-7
  libedata-book1.2-2 libedata-cal1.2-6 libedataserverui1.2-8 libedit2 libeel2-2 libeel2-data libegroupwise1.2-13
  libelfg0 libenchant1c2a libesd-alsa0 libespeak1 libexchange-storage1.2-3 libexempi3 libexif12 libexpat1
  libflac8 libfontconfig1 libfontenc1 libfreetype6 libfs6 libfuse2 libgadu3 libgail-gnome-module libgcc1
  libgconf2-4 libgconf2.0-cil libgcrypt11 libgd2-noxpm libgdata-google1.2-1 libgdata1.2-1 libggz2 libggzcore9
  libggzmod4 libgimp2.0 libgksu2-0 libgl1-mesa-dri libgl1-mesa-glx libglade2-0 libglade2.0-cil libglib-perl
  libglib2.0-0 libglib2.0-cil libglibmm-2.4-1c2a libglu1-mesa libgmime2.2-cil libgnome-keyring0 libgnome-mag2
  libgnome-media0 libgnome-menu2 libgnome-pilot2 libgnome-speech7 libgnome-vfs2.0-cil libgnome-window-settings1
  libgnome2-0 libgnome2-canvas-perl libgnome2-common libgnome2-perl libgnome2-vfs-perl libgnome2.0-cil
  libgnomecanvas2-0 libgnomecanvas2-common libgnomecups1.0-1 libgnomekbd-common libgnomeprint2.2-0
  libgnomeprint2.2-data libgnomeprintui2.2-0 libgnomeprintui2.2-common libgnomeui-0 libgnomeui-common
  libgnomevfs2-0 libgnomevfs2-bin libgnomevfs2-common libgnomevfs2-extra libgomp1 libgpgme11 libgphoto2-2
  libgphoto2-port0 libgpod-common libgpod3 libgraphviz4 libgs8 libgsf-1-114 libgsf-1-common libgsl0ldbl
  libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libgtk-vnc-1.0-0 libgtk2-perl libgtk2.0-0 libgtk2.0-bin
  libgtk2.0-cil libgtk2.0-common libgtkhtml2-0 libgtkhtml3.14-19 libgtkhtml3.16-cil libgtkmm-2.4-1c2a
  libgtksourceview2.0-0 libgtksourceview2.0-common libgtkspell0 libgtop2-7 libgtop2-common libguile-ltdl-1
  libgutenprint2 libgvfscommon0 libgweather-common libgweather1 libhal-storage1 libhal1 libhesiod0
  libhtml-parser-perl libhtml-tagset-perl libicu38 libidn11 libieee1284-3 libjasper1 libkeyutils1 libklibc
  libkpathsea4 libkrb53 liblaunchpad-integration1 liblcms1 libldap-2.4-2 liblircclient0 liblocale-gettext-perl
  liblpint-bonobo0 liblzo2-2 libmagic1 libmagick10 libmetacity0 libmono-addins-gui0.2-cil libmono-addins0.2-cil
  libmono-cairo1.0-cil libmono-cairo2.0-cil libmono-corlib1.0-cil libmono-corlib2.0-cil libmono-data-tds1.0-cil
  libmono-data-tds2.0-cil libmono-security1.0-cil libmono-security2.0-cil libmono-sharpzip0.84-cil
  libmono-sharpzip2.84-cil libmono-sqlite2.0-cil libmono-system-data1.0-cil libmono-system-data2.0-cil
  libmono-system-web1.0-cil libmono-system-web2.0-cil libmono-system1.0-cil libmono-system2.0-cil libmono0
  libmono1.0-cil libmono2.0-cil libmusicbrainz4c2a libnautilus-burn4 libnautilus-extension1 libneon27
  libnet-dbus-perl libnewt0.52 libnl1 libnm-glib0 libnm-util0 libnspr4-0d libnss3-1d libogg0 liboil0.3
  liboobs-1-4 libopal-2.2 libopenobex1 liborbit2 libotr2 libpam-gnome-keyring libpam-modules libpam-runtime
  libpam0g libpanel-applet2-0 libpango1.0-0 libpango1.0-common libpaper-utils libpaper1 libpcap0.8 libpcre3
  libpisock9 libpisync1 libpixman-1-0 libpng12-0 libpolkit-dbus2 libpolkit-gnome0 libpolkit-grant2 libpolkit2
  libpopt0 libpt-1.10.10 libpt-1.10.10-plugins-alsa libpt-1.10.10-plugins-v4l libpt-1.10.10-plugins-v4l2 libpth20
  libpulse-browse0 libpulse0 libpulsecore5 libpurple0 libqthreads-12 librarian0 libraw1394-8 librecode0
  librpc-xml-perl librsvg2-2 librsvg2-common libsamplerate0 libsane libsasl2-2 libsasl2-modules libscim8c2a
  libscrollkeeper0 libsdl1.2debian libsdl1.2debian-alsa libselinux1 libsensors3 libsepol1 libsgutils1 libshout3
  libsigc++-2.0-0c2a libslang2 libslp1 libsm6 libsmbclient libsnmp-base libsnmp15 libsoup2.4-1 libspeex1
  libsqlite3-0 libss2 libssl0.9.8 libstdc++6 libtag1c2a libtasn1-3 libterm-readkey-perl libtext-charwidth-perl
  libtext-iconv-perl libtext-wrapi18n-perl libthai-data libthai0 libtheora0 libtiff4 libtracker-gtk0
  libtrackerclient0 libuniconf4.4 libusb-0.1-4 libusplash0 libuuid1 libvisual-0.4-0 libvolume-id0 libvorbis0a
  libvorbisenc2 libvorbisfile3 libvte-common libvte9 libwavpack1 libwnck-common libwnck22 libwpd8c2a libwpg-0.1-1
  libwps-0.1-1 libwrap0 libwvstreams4.4-base libwvstreams4.4-extras libwww-perl libx11-6 libx11-data libx11-xcb1
  libx86-1 libxau6 libxaw7 libxcb-xlib0 libxcb1 libxcomposite1 libxdamage1 libxdmcp6 libxevie1 libxext6 libxfont1
  libxft2 libxi6 libxinerama1 libxkbfile1 libxklavier12 libxml-parser-perl libxml2 libxml2-utils libxp6
  libxrandr2 libxrender1 libxslt1.1 libxss1 libxtrap6 libxv1 libxxf86misc1 libxxf86vm1 libzephyr3 linux-generic
  linux-headers-generic linux-image-generic linux-restricted-modules-common linux-restricted-modules-generic
  linux-sound-base locales login logrotate lsb-base lsb-release lshw lsof ltrace lzma make makedev man-db
  manpages mawk memtest86+ mesa-utils metacity metacity-common mime-support min12xxw mktemp mlocate
  module-init-tools mono-common mono-gac mono-jit mono-runtime mount mousetweaks mscompress mtr-tiny
  myspell-en-gb myspell-en-za nano nautilus nautilus-cd-burner nautilus-data nautilus-sendto nautilus-share
  net-tools netbase netcat netcat-traditional network-manager network-manager-gnome notification-daemon ntfs-3g
  ntpdate nvidia-kernel-common obex-data-server openoffice.org-base-core openoffice.org-calc
  openoffice.org-common openoffice.org-core openoffice.org-draw openoffice.org-gnome openoffice.org-gtk
  openoffice.org-help-en-gb openoffice.org-help-en-us openoffice.org-hyphenation-en-us openoffice.org-impress
  openoffice.org-l10n-common openoffice.org-l10n-en-gb openoffice.org-l10n-en-za openoffice.org-style-human
  openoffice.org-thesaurus-en-au openoffice.org-thesaurus-en-us openoffice.org-writer openprinting-ppds
  openssh-blacklist openssh-client openssh-server openssl parted passwd pciutils perl perl-base perl-modules
  pidgin pidgin-data pidgin-otr pm-utils pnm2ppa policykit policykit-gnome poppler-utils popularity-contest
  powermgmt-base powernowd ppp pppconfig pppoeconf procps pulseaudio pulseaudio-esound-compat
  pulseaudio-module-gconf pulseaudio-module-hal pulseaudio-module-x11 pulseaudio-utils pxljr python python-apport
  python-apt python-brlapi python-cairo python-central python-cups python-dbus python-gconf python-gdbm
  python-glade2 python-gmenu python-gnome2 python-gnome2-desktop python-gnomecanvas python-gobject python-gst0.10
  python-gtk2 python-gtkhtml2 python-gtksourceview2 python-imaging python-launchpad-bugs
  python-launchpad-integration python-libxml2 python-minimal python-notify python-numeric python-problem-report
  python-pyatspi python-pyorbit python-software-properties python-support python-uno python-virtkey python-vte
  python-xdg python2.5 python2.5-minimal rdesktop readahead rhythmbox rss-glx rsync samba-common scim
  scim-bridge-agent scim-bridge-client-gtk scim-gtk2-immodule scim-modules-socket screen scrollkeeper seahorse
  sed shared-mime-info smbclient software-properties-gtk sound-juicer splix sqlite3 ssh-askpass-gnome ssl-cert
  startup-tasks strace sudo synaptic sysklogd system-config-printer-common system-config-printer-gnome
  system-services system-tools-backends sysv-rc sysvutils tangerine-icon-theme tar tasksel tasksel-data tcpd
  tcpdump thunderbird-locale-en-gb time tomboy toshset totem totem-common totem-gstreamer totem-mozilla
  totem-plugins tracker tracker-search-tool transmission-common transmission-gtk tsclient ttf-arabeyes
  ttf-arphic-uming ttf-dejavu-core ttf-freefont ttf-indic-fonts-core ttf-kochi-gothic ttf-kochi-mincho
  ttf-malayalam-fonts ttf-opensymbol ttf-thai-tlwg ttf-unfonts-core tzdata ubufox ubuntu-artwork ubuntu-docs
  ubuntu-gdm-themes ubuntu-minimal ubuntu-sounds ubuntu-standard ubuntu-wallpapers ucf udev ufw
  unattended-upgrades unzip update-inetd update-manager update-manager-core update-notifier
  update-notifier-common upstart upstart-compat-sysv upstart-logd usbutils usplash usplash-theme-ubuntu
  util-linux util-linux-locales uuid-runtime vbetool vim-common vim-tiny vinagre vino w3m wamerican wbritish wget
  whiptail whois wodim wpasupplicant wvdial x-ttcidfont-conf x11-apps x11-common x11-utils x11-xkb-utils
  x11-xserver-utils xauth xbase-clients xdg-user-dirs xdg-user-dirs-gtk xdg-utils xfonts-utils xinit xkb-data
  xml-core xorg xsane xsane-common xscreensaver-data xscreensaver-gl xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-kbd xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-vmmouse xserver-xorg-input-wacom xserver-xorg-video-all
  xserver-xorg-video-amd xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati
  xserver-xorg-video-chips xserver-xorg-video-cirrus xserver-xorg-video-dummy xserver-xorg-video-fbdev
  xserver-xorg-video-geode xserver-xorg-video-glint xserver-xorg-video-i128 xserver-xorg-video-i740
  xserver-xorg-video-i810 xserver-xorg-video-intel xserver-xorg-video-mga xserver-xorg-video-neomagic
  xserver-xorg-video-nsc xserver-xorg-video-nv xserver-xorg-video-openchrome xserver-xorg-video-rendition
  xserver-xorg-video-s3 xserver-xorg-video-s3virge xserver-xorg-video-savage xserver-xorg-video-siliconmotion
  xserver-xorg-video-sis xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-tga
  xserver-xorg-video-trident xserver-xorg-video-tseng xserver-xorg-video-v4l xserver-xorg-video-vesa
  xserver-xorg-video-vga xserver-xorg-video-vmware xserver-xorg-video-voodoo xsltproc xterm xulrunner-1.9
  xulrunner-1.9-gnome-support xutils xutils-dev yelp zenity zlib1g
939 upgraded, 127 newly installed, 20 to remove and 1 not upgraded.
Need to get 582MB of archives.
After this operation, 304MB of additional disk space will be used.
Do you want to continue [Y/n]? n</pre>
<h4>5. Reboot and enjoy the upgraded system</h4>
<p>Reboot your Ubuntu:</p>
<pre>ubuntu# <strong>shutdown -i6 -r now</strong></pre>
<p>&#8230; and once your system is back up, you're ready to verify that it's been successfully upgraded:</p>
<pre>ubuntu# <strong>cat /etc/lsb-release</strong>
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"</pre>
<p>That's it, good luck with your Ubuntu upgrade!</p>
<h3>Related books</h3>
<p>If you want to learn more about Ubuntu, here's a great book:</p>
<div id="attachment_363" class="wp-caption aligncenter" style="width: 144px"><a href="http://www.amazon.com/gp/product/1934356220?ie=UTF8&amp;tag=unixtutorial-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1934356220"><br />
<img class="size-full wp-image-370" title="ubuntu-kung-fu-practical-guide" src="http://www.unixtutorial.org/images/ubuntu-kung-fu-practical-guide.jpg" alt="ubuntu-kung-fu-practical-guide" width="134" height="160" /></a><p class="wp-caption-text">Ubuntu Kung Fu</p></div>
<h3>See also:</h3>
<ul>
<li><strong><a title="ubuntu releases" href="http://www.unixtutorial.org/reference/ubuntu-releases-and-codenames/">Ubuntu releases and codenames</a></strong></li>
<li><strong><a title="Intrepid Ibex" href="http://www.unixtutorial.org/2008/10/ubuntu-810-intrepid-ibex-is-here/">Ubuntu 8.10: Intrepid Ibex</a></strong></li>
<li><strong><a title="List packages in Ubuntu" href="http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/">List installed packages in Ubuntu</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/01/ubuntu-upgrade-from-hardy-heron-to-intrepid-ibex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Check if Any Users Were Added or Deleted on Your Linux System</title>
		<link>http://www.unixtutorial.org/2009/01/how-to-check-if-any-users-were-added-or-deleted-on-your-linux-system/</link>
		<comments>http://www.unixtutorial.org/2009/01/how-to-check-if-any-users-were-added-or-deleted-on-your-linux-system/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 00:54:27 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Advanced topics]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=345</guid>
		<description><![CDATA[Yesterday in my post on numeric userids instead of usernames, I touched briefly the problem of recovering the username if you only know the userid it once had. Today I would like to show you another option which may be available to you when it comes to recovering the usernames of removed users by their [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday in my post on <a title="numeric userids i unix" href="http://www.unixtutorial.org/2009/01/what-to-do-if-numeric-id-is-shown-instead-of-unix-username/">numeric userids instead of usernames</a>, I touched briefly the problem of recovering the username if you only know the userid it once had. Today I would like to show you another option which may be available to you when it comes to recovering the usernames of removed users by their userid.</p>
<h3>useradd and userdel logs in Ubuntu</h3>
<p>Both <strong>useradd </strong>and userdel commands keep logs in many Unix-like systems. This means that every newly created user gets the whole procedure documented in appropriate logs with lines similar to this (it's an Ubuntu example, <strong>/var/log/auth.log</strong> file):</p>
<pre>Jan  6 04:24:27 simplyunix useradd[1456]: new group: name=mike, GID=1006
Jan  6 04:24:27 simplyunix useradd[1456]: new user: name=mike, UID=1006, GID=1006, home=/home/mike, shell=/bin/sh</pre>
<p>Similarly, deleting a file doesn't go unnoticed neither:</p>
<pre>Jan  6 04:29:21 simplyunix userdel[1516]: delete user `mike'
Jan  6 04:29:21 simplyunix userdel[1516]: delete `mike' from group `admin'
Jan  6 04:29:21 simplyunix userdel[1516]: removed group `mike' owned by `mike'</pre>
<p>So, there's a chance that by simply going through /var/log/auth.log you will find the userid of a local Unix user which was recently removed. But the reason I won't say "there's a really good chance" is because most of the logs in /var/log are rotated on a weekly and monthly basis, and this means the information about new users created or deleted may not be there at the time you go looking for it &#8211; anyone who was added or deleted more than few months ago will not show up.</p>
<h3>useradd and userdel in RedHat Enterprise Linux</h3>
<p>Similar to Ubuntu, you can find recent user management activity logged in RHEL system, in /var/log/secure file.</p>
<p><strong>useradd </strong>will produce something link this:</p>
<pre>Jan  8 00:18:36 rhel5 useradd[2674]: new group: name=newuser, GID=501
Jan  8 00:18:36 rhel5 useradd[2674]: new user: name=newuser, UID=501, GID=501, home=/home/newuser, shell=/bin/bash</pre>
<p>&#8230; while <strong>userdel </strong>will document its actions with the following:</p>
<pre>Jan  8 00:18:40 rhel5 userdel[2682]: delete user `newuser'
Jan  8 00:18:40 rhel5 userdel[2682]: removed group `newuser' owned by `newuser'</pre>
<h3>How to check if any users were added on your Unix system</h3>
<p>Based on the information above, all you have to do is something like this:</p>
<pre>ubuntu$ <strong>grep useradd /var/log/* </strong></pre>
<p>This is bound to return you a list of all the recently added users.</p>
<h3>How to confirm local users which were recently removed</h3>
<p>Similarly, use a command like this to find out if any users were recently removed:</p>
<pre>ubuntu$ <strong>grep userdel /var/log/* </strong></pre>
<p>Hope this helps! Enjoy!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="userids instead of usernames" href="http://www.unixtutorial.org/2009/01/what-to-do-if-numeric-id-is-shown-instead-of-unix-username/">What to do if numerid userids are shown instead of usernames in file ownership</a></strong></li>
<li><strong><a title="create unix accounts" href="http://www.unixtutorial.org/2008/12/how-to-create-user-accounts-in-unix/">Creating new users in Unix with useradd</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/01/how-to-check-if-any-users-were-added-or-deleted-on-your-linux-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking the Progress of  Rsync Transfers</title>
		<link>http://www.unixtutorial.org/2008/10/tracking-the-progress-of-rsync-transfers/</link>
		<comments>http://www.unixtutorial.org/2008/10/tracking-the-progress-of-rsync-transfers/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 17:09:57 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=121</guid>
		<description><![CDATA[In my first introductory rsync post, How To Synchronize Directories with Rsync, I've shown you the most basic approach to syncing two directories up. Today, I'd like to show you another useful thing you can do with rsync.
Just to remind you all, rsync is a remote synchronization tool. This means that its primary use lies [...]]]></description>
			<content:encoded><![CDATA[<p>In my first introductory <strong>rsync </strong>post, <strong><a title="synchronize directories with rsync" href="http://www.unixtutorial.org/2008/09/how-to-synchronize-directories-with-rsync/">How To Synchronize Directories with Rsync</a></strong>, I've shown you the most basic approach to syncing two directories up. Today, I'd like to show you another useful thing you can do with <strong>rsync</strong>.</p>
<p>Just to remind you all,<strong> rsync </strong>is a <em><strong>r</strong>emote <strong>sync</strong>hronization</em> tool. This means that its primary use lies in the filed of synchronizing files and directories between remote Unix systems, but I feel that it's really important for you to understand the basics before moving on to more advanced stuff.</p>
<p>The beauty of <strong>rsync </strong>is that its syntax and command line options are exactly the same for local and remote directories synchronizations, so it's not like you'll have to learn it all from scratch when I show you the real world usage of <strong>rsync </strong>in my next post.</p>
<h3><strong>rsync experiments setup</strong></h3>
<p>Just use the following commands to re-create your rsync playground for this post:</p>
<pre><strong>ubuntu$</strong> rm -rf /tmp/dir1 /tmp/dir2
<strong>ubuntu$</strong> mkdir /tmp/dir1 /tmp/dir2
<strong>ubuntu$</strong> cd /tmp
<strong>ubuntu$</strong> echo "original file 1" &gt; dir1/file1
<strong>ubuntu$</strong> echo "original file 2" &gt; dir1/file2
<strong>ubuntu$</strong> echo "original file 3" &gt; dir1/file3
<strong>ubuntu$ </strong>cp dir1/file1 dir2</pre>
<p>It will probably be more convenient for you to just download the same commands in form of a script though, so here's the link: <a title="rsync setup script" href="http://www.unixtutorial.org/examples/rsync-setup.sh">rsync-setup.sh</a></p>
<h3>Tracking rsync progress</h3>
<p>The larger the directories you're synchronizing with rsync, the longer it will take for the command to finish. Depending on the scale of your task, it can be minutes, long hours or even days before you get the synchronization complete. With this in mind, the importance of progress tracking with rsync should be obvious to you.</p>
<p>Here's how you make <strong>rsync </strong>report its progress: just use the <strong>&#8211;progress</strong> command line option (in addition to the command line I introduced you to last time):</p>
<pre>ubuntu$ <strong>rsync -avz --stats --progress /tmp/dir1/ /tmp/dir2</strong>
building file list ...
4 files to consider
file2
          16 100%    0.00kB/s    0:00:00 (xfer#1, to-check=1/4)
file3
          16 100%   15.62kB/s    0:00:00 (xfer#2, to-check=0/4)</pre>
<pre>Number of files: 4
Number of files transferred: 2
Total file size: 48 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 59
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 193
Total bytes received: 64</pre>
<pre>sent 193 bytes  received 64 bytes  514.00 bytes/sec
total size is 48  speedup is 0.19</pre>
<h3><strong>Why you should track the progress of rsyncs</strong></h3>
<p>The key differences are that you first get a regularly updated message about building a file list. When you run into hundreds of thousands of files, this becomes quite useful:</p>
<pre>building file list ...
4 files to consider</pre>
<p>Another way to track progress is to see the transfer progress for each of the involved files. For thousands tiny files it won't be all that impressive a feature, but if you're transferring huge files between remote systems, a dynamic transfer progress for each file will be exactly what you need:</p>
<pre>file2
          16 100%    0.00kB/s    0:00:00 (xfer#1, to-check=1/4)
file3
          16 100%   15.62kB/s    0:00:00 (xfer#2, to-check=0/4)</pre>
<p>That's it, hope you like this new option. I promise to tell you more some other time!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="rsync synchronization" href="http://www.unixtutorial.org/2008/09/how-to-synchronize-directories-with-rsync/">Synchronize Directories in Unix with rsync command</a></strong></li>
<li><strong><a title="How to compare Unix directories" href="http://www.unixtutorial.org/2008/06/how-to-compare-directories-in-unix/">Comparing directories in Unix</a></strong></li>
<li><strong><a title="How to find large files and directories" href="http://www.unixtutorial.org/2008/03/find-large-files-and-directories/">Finding large files and directories</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2008/10/tracking-the-progress-of-rsync-transfers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>List Installed Packages on Your Ubuntu Linux</title>
		<link>http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/</link>
		<comments>http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:00:28 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=80</guid>
		<description><![CDATA[If you're interested in what exactly your Ubuntu system has got installed, there's a command you can use to list the packages along with their versions and short descriptions.
How packages information is stored in Ubuntu
Essentially being a fork of the Debian Linux, Ubuntu inherited quite a lot of things from it. One of them is [...]]]></description>
			<content:encoded><![CDATA[<p>If you're interested in what exactly your Ubuntu system has got installed, there's a command you can use to list the packages along with their versions and short descriptions.</p>
<h3>How packages information is stored in Ubuntu</h3>
<p>Essentially being a fork of the Debian Linux, Ubuntu inherited quite a lot of things from it. One of them is the way packages are installed and managed.</p>
<p><strong>dpkg </strong>(Debian Package Manager) is a command found in every Ubuntu installation. While managing software packages, it stores all the files it depends upon in a <strong>/var/lib/dpkg</strong> directory. Most of these files you can look into using basic Unix commands, but there's really no need because <strong>dpkg </strong>does it for you.</p>
<p>For example, status of all the installed packages is stored in <strong>/var/lib/dpkg/status</strong> file.<br />
Here's how it looks, just to give you an idea:</p>
<pre>Package: bash
Essential: yes
Status: install ok installed
Priority: required
Section: shells
Installed-Size: 2012
Maintainer: Ubuntu Core developers &lt;ubuntu-devel-discuss@lists.ubuntu.com&gt;
Architecture: amd64
Version: 3.2-0ubuntu7
Replaces: bash-doc (&lt;= 2.05-1), bash-completion
Depends: base-files (&gt;= 2.1.12), debianutils (&gt;= 2.15)
Pre-Depends: libc6 (&gt;= 2.5-0ubuntu1), libncurses5 (&gt;= 5.4-5)
Suggests: bash-doc
Conflicts: bash-completion
Conffiles:
 /etc/skel/.bashrc 52acca91b52f797661c89b181809b9f3
 /etc/skel/.profile 7d97942254c076a2ea5ea72180266420
 /etc/skel/.bash_logout 22bfb8c1dd94b5f3813a2b25da67463f
 /etc/bash.bashrc 860d464fca66fff1af4993962a253611
 /etc/bash_completion c8bce25ea68fb0312579a421df99955c
 /etc/skel/.bash_profile d1a8c44e7dd1bed2f3e75d1343b6e4e1 obsolete
Description: The GNU Bourne Again SHell
 Bash is an sh-compatible command language interpreter that executes
 commands read from the standard input or from a file.  Bash also
 incorporates useful features from the Korn and C shells (ksh and csh).
 .</pre>
<p>As you can see, there's all the possible information about bash package (the Bourne Again Shell), but you usually don't need to know this much, so instead we'll use dpkg command to confirm what packages are installed and which ones are not.</p>
<h3>List installed packages with dpkg</h3>
<p>The easiest way to confirm the list of packages installed on your Ubuntu OS is to run dpkg -l command. The output is quite long, so I'll only show you a fragment of it:</p>
<pre>ubuntu# <strong>dpkg -l | more</strong>
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                       Version                                      Description
+++-==========================-============================================-============================================
ii  adduser                    3.100                                        Add and remove users and groups
ii  alsa-base                  1.0.13-3ubuntu1                              ALSA driver configuration files
ii  alsa-utils                 1.0.13-1ubuntu5                              ALSA utilities
ii  apache2                    2.2.3-3.2ubuntu2.1                           Next generation, scalable, extendable web se
rc  apache2-common             2.0.55-4ubuntu4                              next generation, scalable, extendable web se
ii  apache2-doc                2.2.3-3.2ubuntu2.1                           documentation for apache2
ii  apache2-mpm-prefork        2.2.3-3.2ubuntu2.1                           Traditional model for Apache HTTPD 2.1
ii  apache2-utils              2.2.3-3.2ubuntu2.1                           utility programs for webservers
ii  apache2.2-common           2.2.3-3.2ubuntu2.1                           Next generation, scalable, extendable web se
ii  apt                        0.6.46.4ubuntu10                             Advanced front-end for dpkg
ii  apt-utils                  0.6.46.4ubuntu10                             APT utility programs
ii  aptitude                   0.4.4-1ubuntu3                               terminal-based apt frontend
ii  at                         3.1.10ubuntu4                                Delayed job execution and batch processing
ii  autoconf                   2.61-3                                       automatic configure script builder
ii  automake1.4                1.4-p6-12                                    A tool for generating GNU Standards-complian
ii  automake1.9                1.9.6+nogfdl-3ubuntu1                        A tool for generating GNU Standards-complian
ii  autotools-dev              20060920.1                                   Update infrastructure for config.{guess,sub}
ii  awstats                    6.5+dfsg-1ubuntu3                            powerful and featureful web server log analy
ii  base-files                 4ubuntu2                                     Debian base system miscellaneous files</pre>
<p>The legend at the very top of the output explains the first 3 charactes of each line in the dpkg output, the symbols there confirm whether each package is expected to be installed, and whether it's actually installed or partially installed:</p>
<pre>
<pre>Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=b
||/ Name                       Version                                      Description
+++-==========================-============================================-============================================
ii  adduser                    3.100                                        Add and remove users and groups</pre>
</pre>
<p>A first letter of each option is used, so ii for the adduser package in this example means that the desired state for this package is "Installed" (first i) and the actual status is "Installed" as well. That's the normal condition for most of your packages.</p>
<p>As you can also see, each line shows you the version of each package you have and provides a brief description of what a package is used for.</p>
<p>That's it, this should be a good start for your Ubuntu exploration, I'll post a few more things about <strong>dpkg </strong>in the future.</p>
<h3>Related books</h3>
<p>If you want to learn more, here's a great book:</p>
<div id="attachment_363" class="wp-caption aligncenter" style="width: 144px"><a href="http://www.amazon.com/gp/product/1934356220?ie=UTF8&amp;tag=unixtutorial-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1934356220"><br />
<img class="size-full wp-image-370" title="ubuntu-kung-fu-practical-guide" src="http://www.unixtutorial.org/images/ubuntu-kung-fu-practical-guide.jpg" alt="ubuntu-kung-fu-practical-guide" width="134" height="160" /></a><p class="wp-caption-text">Ubuntu Kung Fu</p></div>
<h3>See also:</h3>
<ul>
<li><strong><a title="Debian Linux" href="http://en.wikipedia.org/wiki/Debian">Debian @ Wikipedia</a></strong></li>
<li><strong><a title="Unix Release version" href="http://www.unixtutorial.org/2007/08/how-to-find-out-the-release-version-of-your-unix/">Finding out the release version of your Unix</a></strong></li>
<li><strong><a title="apt-get proxy" href="http://www.unixtutorial.org/2007/09/how-to-use-apt-get-behind-proxy/">apt-get behind proxy</a></strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
