<?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>Linux and Virtualization &#187; shell</title>
	<atom:link href="http://fclose.com/b/linux/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://fclose.com/b/linux</link>
	<description>Clear solutions, tutorials and tips on Linux and virtualization from the author&#039;s experience with clusters.</description>
	<lastBuildDate>Thu, 09 Feb 2012 14:49:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Upgrading Fedora to Newer Version with Yum</title>
		<link>http://fclose.com/b/linux/3429/upgrading-fedora-to-newer-version-with-yum/</link>
		<comments>http://fclose.com/b/linux/3429/upgrading-fedora-to-newer-version-with-yum/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 13:16:21 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Server config]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fclose.com/b/linux/?p=3429</guid>
		<description><![CDATA[Please consider PreUpgrade for upgrading Fedora. This is the recommended method. This post makes a list of actions should be done to upgrade Fedora using yum. Please note that this is for experienced users only, if you are not sure what you are doing and what do these commands mean, please stop here and read [...]]]></description>
			<content:encoded><![CDATA[<p>Please consider <a href="http://fclose.com/t/go/preupgrade-fedora/" rel="nofollow">PreUpgrade</a> for upgrading Fedora. This is the recommended method.</p>
<hr />
<p>This post makes a list of actions should be done to upgrade Fedora using yum. Please note that this is for experienced users only, if you are not sure what you are doing and what do these commands mean, please stop here and read the manuals first, or go to Fedora&#8217;s Wiki about <a href="http://fclose.com/t/go/upgrading_fedora_using_yum/" rel="nofollow">upgrading Fediora using yum</a>.</p>
<p>This post aims to be a general method, although we use Fedora 15 to Fedora 16 as the example. We configure and install grub2 as the bootloader.</p>
<h3>Clean Stuff</h3>
<p>It is a good time to remove packages we don&#8217;t use. These packages could be candidates for removal, but check to see whether you use them directly or if they are used by applications not backed by rpm packages.</p>
<pre># package-cleanup --leaves</pre>
<p>You can find orphaned packages (i.e. packages not in the repositories anymore). This will also show packages which have been partially uninstalled but where the &#8220;%postun&#8221; script failed.</p>
<pre># package-cleanup --orphans</pre>
<h3>Do the upgrade</h3>
<h4>Go to a text console and run in level 3</h4>
<pre>ctrl + alt + F2</pre>
<pre>init 3</pre>
<h4>Update yum first</h4>
<pre>yum update yum</pre>
<h4>Clean all cached meta data and packages</h4>
<pre>yum clean all</pre>
<h4>Import the key for the newer version&#8217;s repository</h4>
<p>For Fedora 16, it is</p>
<pre>rpm --import https://fedoraproject.org/static/A82BA4B7.txt</pre>
<h4>Synchronizes the installed package set with the latest packages available</h4>
<pre>yum --releasever=&lt;release_number_you_want_to_sync_to&gt; distro-sync</pre>
<p>For upgrading Fedora 15 to Fedora 16:</p>
<pre>yum --releasever=16 --disableplugin=presto  distro-sync</pre>
<p>Double check the updated repositories after distro-sync</p>
<pre>yum repolist</pre>
<h4>Update groups</h4>
<pre>yum groupupdate Base</pre>
<p>List all other groups</p>
<pre>yum grouplist</pre>
<p>and also update them</p>
<pre>yum groupupdate ALL GROUPS LISTED</pre>
<h4>Use grub2 instead of grub</h4>
<p>Make configuration for grub2</p>
<pre>/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg</pre>
<p>Install grub2</p>
<pre>/sbin/grub2-install BOOTDEVICE</pre>
<p>For example, to install grub2 on sda:</p>
<pre>/sbin/grub2-install /dev/sda</pre>
<h4>Reset services start/stop priorities</h4>
<pre>cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done</pre>
<h4>Reboot the system now</h4>
<p>After reboot, you may see new kernel version on new Fedora version. For example, kernel 3.1.1 on Fedora 16</p>
<pre>[root@localhost ~]# uname -a
Linux localhost.localdomain 3.1.1-1.fc16.x86_64 #1 SMP Fri Nov 11 21:47:56 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux</pre>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/3429/upgrading-fedora-to-newer-version-with-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install, Run and Uninstall VMware Player and VirtualBox on Fedora Linux</title>
		<link>http://fclose.com/b/linux/3460/how-to-install-run-and-uninstall-vmware-player-and-virtualbox-on-fedora-linux/</link>
		<comments>http://fclose.com/b/linux/3460/how-to-install-run-and-uninstall-vmware-player-and-virtualbox-on-fedora-linux/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 00:46:13 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Full Virtualization]]></category>
		<category><![CDATA[Server config]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://fclose.com/b/linux/?p=3460</guid>
		<description><![CDATA[VMware Player and VirtualBox are two cool and free full virtualization solutions and both can run on top of a Linux host. In this post, we introduces how to install, run, and uninstall VMware Player and VirtualBox on Fedora Linux. VMware Player Install VMware Player Download the installation bundle from VMware&#8217;s website. For example, the [...]]]></description>
			<content:encoded><![CDATA[<p>VMware Player and VirtualBox are two cool and free full virtualization solutions and both can run on top of a Linux host. In this post, we introduces how to install, run, and uninstall VMware Player and VirtualBox on Fedora Linux.</p>
<h3>VMware Player</h3>
<h4>Install VMware Player</h4>
<p>Download the installation bundle from <a href="http://fclose.com/t/go/vmware-player/" rel="nofollow">VMware&#8217;s website</a>. For example, the file we download is: VMware-Player-4.0.0-471780.x86_64.bundle .</p>
<p>Install needed kernel header and devel packages</p>
<pre># yum install kernel-headers kernel-devel</pre>
<p>Run the bundle file</p>
<pre># sh VMware-Player-4.0.0-471780.x86_64.bundle</pre>
<p>Then just follow the instruction of the GUI of the VMware installer, and you can finish the installation.</p>
<p>For Fedora 16 with kernel 3.1.0 or 3.1.1 with VMware Player 4.0.0, the vmnet module can not compile vmnet module. The VMware-Player-4.0.1-528992.x86_64 fixes this problem and works well with 3.1 kernel. If you want to run VMware Player 4.0.0, the community give patches to it so that it works with kernel 3.1. The <a href="http://fclose.com/t/go/angeleri-patch-vmplayer-4.0.0-kernel-3.1/" rel="nofollow">patch and script given by Stefano Angeleri</a> works well for me. You may use it quickly by the following commands.</p>
<pre>$ wget http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/09/vmware8linux31fix.tar.gz
$ tar xf vmware8linux31fix.tar.gz
# sh ./patch-modules_3.1.0.sh</pre>
<p>systemctl prints a &#8220;[FAILED]&#8221; message. But you can ignore it and VMware Player works.</p>
<h4>Run VMware Player</h4>
<p>Just execute</p>
<pre>$ vmplayer</pre>
<p>Start a virtual machine just by one command</p>
<pre>$ vmplayer /path/to/virtual/machine/config.vmx &amp;</pre>
<p>Give the path to the virtual machine configuration file (a .vmx file under the virtual machine&#8217;s directory) to vmplayer as its parameter.</p>
<h4>Uninstall VMware Player</h4>
<p>VMware installer provides the method to uninstall VMware products. We can use this tool</p>
<pre># vmware-installer  --uninstall-product vmware-player</pre>
<p>It has a GUI and just follow its instruction to finish the uninstallation.</p>
<h3>VirtualBox</h3>
<h4>Install VirtualBox</h4>
<p>We use VirtualBox&#8217;s repository for Fedora here. We use VirtualBox-4.1 as the example.</p>
<p>Download the repository file.</p>
<pre># cd /etc/yum.repos.d
# wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo</pre>
<p>Install VirtualBox using yum</p>
<pre># yum install VirtualBox-4.1</pre>
<h4>Run VirtualBox</h4>
<p>Just execute</p>
<pre>$ virtualbox</pre>
<p>Start a virtual machine just by one command</p>
<pre># VBoxManage startvm name_of_the_virtual_machine</pre>
<p>VBoxManager use the virtual machine&#8217;s name as its parameter. The name can be found from VirtualBox&#8217;s virtual machine list.</p>
<h4>Uninstall VirtualBox</h4>
<p>As installing VirtualBox, we can uninstall (erase) it using yum</p>
<pre># yum erase VirtualBox-4.1</pre>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/3460/how-to-install-run-and-uninstall-vmware-player-and-virtualbox-on-fedora-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing ns-2 and ns-3 on Fedora Linux</title>
		<link>http://fclose.com/b/linux/3376/install-ns-2-and-ns-3-on-fedora-linux/</link>
		<comments>http://fclose.com/b/linux/3376/install-ns-2-and-ns-3-on-fedora-linux/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 07:53:22 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[nam]]></category>
		<category><![CDATA[ns-2]]></category>
		<category><![CDATA[ns-3]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fclose.com/b/linux/?p=3376</guid>
		<description><![CDATA[ns is a discrete-event network simulator targeted primarily for research and educational use. There are two version of ns, ns-2 and ns-3, which are quite different with each other in the implementation and method to use them. In this post, we introduce how to install ns-2 and ns-3 on Fedora Linux 15. Install ns-2.34 on [...]]]></description>
			<content:encoded><![CDATA[<p>ns is a discrete-event network simulator targeted primarily for research and educational use. There are two version of ns, <a href="http://fclose.com/t/go/ns-2/" rel="nofollow">ns-2</a> and <a href="http://fclose.com/t/go/ns-3/" rel="nofollow">ns-3</a>, which are quite different with each other in the implementation and method to use them. In this post, we introduce how to install ns-2 and ns-3 on Fedora Linux 15.</p>
<h3>Install ns-2.34 on Fedora</h3>
<p>Download the allinone package</p>
<pre>$ wget http://downloads.sourceforge.net/project/nsnam/allinone/ns-allinone-2.34/ns-allinone-2.34.tar.gz</pre>
<p>Uncompress the pacakge</p>
<pre>$ tar xf ns-allinone-2.34.tar.gz</pre>
<p>Install needed pacakges</p>
<pre># yum install gcc make libX11-devel libXt-devel libXmu-devel</pre>
<p>Ns-2 requires older version of gcc. So we install gcc-34 and gcc-34-c++ for it</p>
<pre># yum install compat-gcc-34 compat-gcc-34-c++</pre>
<p>Install the allinon package of ns-2. During the install process, specify the CXX compiler we use</p>
<pre>$ cd ns-allinone-2.34
$ CXX=g++34 ./install</pre>
<p>Configure the environmental variables for ns-2 and nam, and add the executables to the PATH so that we can use ns and nam directly.</p>
<p>Add to <em>~/.bashrc</em> if you use bash</p>
<pre>NS_HOME=/full/path/to/ns-allinone-2.34
PATH=$NS_HOME/bin:$NS_HOME/tcl8.4.18/unix:$NS_HOME/tk8.4.18/unix:$PATH
export PATH</pre>
<p>or</p>
<p>Add to <em>~/.cshrc_user</em> if you use c shell</p>
<pre>setenv NS_HOME "/full/path/to/ns-allinone-2.34"
setenv PATH "${PATH}:${NS_HOME}/bin:${NS_HOME}/tcl8.4.18/unix:${NS_HOME}/tk8.4.18/unix"
setenv LD_LIBRARY_PATH "${NS_HOME}/otcl-1.13:${NS_HOME}/ns-2.34/lib:/usr/local/lib"
setenv TCL_LIBRARY "${NS_HOME}/tcl8.4.18/library"</pre>
<p>The installation is done by this step. Open another shell and try our installation:</p>
<pre>$ nam</pre>
<p>and</p>
<pre>$ ns</pre>
<h3>Install ns-3.12.1 on Fedora</h3>
<p>Install needed packages</p>
<pre># yum install libxml2 libxml2-devel gcc gcc-c++ make automake \
autoconf binutils openssh-server openssh-clients openssl python \
python-devel mercurial bzr scons flex bison tcpdump valgrind gdb</pre>
<p>Download the allinone pacakge for ns-3</p>
<pre>$ mkdir tarballs
$ cd tarballs
$ wget http://www.nsnam.org/release/ns-allinone-3.12.1.tar.bz2
$ tar xjf ns-allinone-3.12.1.tar.bz2</pre>
<p>Build ns-3</p>
<pre>$ cd ns-allinone-3.12.1/
$ ./build.py</pre>
<p>We will now interact directly with Waf in the ns-3.12.1 directory</p>
<pre>$ cd ns-3.12.1</pre>
<p>Configuration with Waf</p>
<pre>$ ./waf -d optimized configure --enable-examples; ./waf</pre>
<p>Validate our installation by running one example</p>
<pre>$ ./waf shell
$ cd build/optimized/examples/
$ udp/udp-echo</pre>
<p>Use tcpdump to display the simulation result</p>
<pre>$ tcpdump -tt -r udp-echo-0-1.pcap</pre>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/3376/install-ns-2-and-ns-3-on-fedora-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Set Up and Configure NFS Server and Clients</title>
		<link>http://fclose.com/b/linux/3396/how-to-set-up-and-configure-nfs-server-and-clients/</link>
		<comments>http://fclose.com/b/linux/3396/how-to-set-up-and-configure-nfs-server-and-clients/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 15:42:09 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[Server config]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fclose.com/b/linux/?p=3396</guid>
		<description><![CDATA[NFS is widely deployed and used even after more than twenty year. NFS is easy to set up and easy to use. This introduces how to set up the NFS server and clients. We use the Fedora system as the example. Set up a NFS Server Configure /etc/exports to give clients the permission to use [...]]]></description>
			<content:encoded><![CDATA[<p>NFS is widely deployed and used even after more than twenty year. NFS is easy to set up and easy to use. This introduces how to set up the NFS server and clients. We use the Fedora system as the example.</p>
<h3>Set up a NFS Server</h3>
<p>Configure /etc/exports to give clients the permission to use the NFS directories.</p>
<h4>Edit /etc/exports</h4>
<p>For example, to allow the servers inside subnet 10.0.0.1/24 to mount the /home directory with read/write permission. Add this line to /etc/exports:</p>
<pre>/home 10.0.0.1/24(rw)</pre>
<p>For details of the exports functions, please refer to <a href="http://fclose.com/p/linux/man/5-exports/">export manual</a>.</p>
<h4>Start up the NFS service</h4>
<p>Enable nfs service on the NFS server so that the NFS service daemon automatically starts each time the server starts:</p>
<pre># /sbin/chkconfig nfs on</pre>
<p>You may also manually start it</p>
<pre># service nfs start</pre>
<h3>Client-slide configuration</h3>
<h4>Package installation</h4>
<pre># yum nfs-utils</pre>
<h4>Start the rpcbind service</h4>
<pre># service rpcbind restart</pre>
<p>You may also set it to start automatically</p>
<p># chkconfig rpcbind on</p>
<h4>Mount the NFS directory</h4>
<pre># mount NFS_SERVER:/lhome/userdir MOUNT_POINT</pre>
<p>where NFS_SERVER is the NFS server&#8217;s address, and MOUNT_POINT is the local mount point on the client side for the NFS directory.</p>
<p>You may also consider using autofs on top of NFS as described in <a href="/281/unified-linux-login-and-home-directory-using-openldap-and-nfsautomount/">Unified Linux Login and Home Directory Using OpenLDAP and NFS/automount</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/3396/how-to-set-up-and-configure-nfs-server-and-clients/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Howto for New Git Users</title>
		<link>http://fclose.com/b/linux/3358/howto-for-new-git-user/</link>
		<comments>http://fclose.com/b/linux/3358/howto-for-new-git-user/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 07:54:03 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fclose.com/b/linux/?p=3358</guid>
		<description><![CDATA[This post is a tutorial for new users to set up git and clone and use the first repository. This post introduces how to start using git for new users. This post does not introduce details of how to use git commands. Please refer to the git manual or other tutorials for how to commit, [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a tutorial for new users to set up git and clone and use the first repository. This post introduces how to start using git for new users. This post does not introduce details of how to use git commands. Please refer to the <a href="http://fclose.com/p/linux/man/1-git/">git manual </a>or other tutorials for how to commit, push, etc.</p>
<p>In this post, we introduce how to set up keys for git, how to configure non-standard SSH port for git, and how to use the first git repository.</p>
<h3>Users’ SSH private/public key pairs</h3>
<p>Every user of git, administrator or a normal user, need to have a private/public SSH key pairs in ~/.ssh.</p>
<p>New users need to generate the key pairs (if they don’t have one) by executing this command:</p>
<pre>$ ssh-keygen -t rsa</pre>
<p>After generating the key pairs, the user can give the public key (~/.ssh/id_rsa.pub) to the git server administrator and ask he/she to create a account and repository.</p>
<p>After the git server administrator adds the new user by its public key to the git server, the user can starts to use git.</p>
<h3>Non-standard SSH port</h3>
<p>This section only for the git servers that use non-stardard SSH port, i.e. other than 22.</p>
<p>If sshd is listening on non-standard port(s) on the git server, for example 22111, the user should set SSH to use the special port. We use example.org:22111 as the example here.</p>
<p>Put these two lines in your <em>~/.ssh/config</em> file:</p>
<pre>Host example.org
  Port 22111</pre>
<p>If this <em>~/.ssh/config</em> file doesn’t exist, you should create it first and set it’s mod to 744:</p>
<pre>$ chmod 744 ~/.ssh/config</pre>
<h3>Create the new repository</h3>
<p>This section only for users to create new repository. If the user is to use an already exist repository, please skip this section. Besides, the steps in this section only need to be done once for one repository.</p>
<p>We use the example that the administrator create repository <em>repo1</em> for <em>user1</em> and give <em>user1</em> write privilege to this repository. We assume the address for this repository is <em>git@example.org:repo1.git</em> . Now we introduce how does <em>user1</em> create the new repository <em>repo1</em>.</p>
<p>As <em>user1</em> has the write privilege on the <em>repo1</em> repository, it can create this repository on it’s local machine first and then push it to the git server. After pushing it to the git server.</p>
<p>These operations are done by <em>user1 </em>on its local machine:</p>
<pre>$ mkdir repo1
$ cd repo1
$ git init
$ touch README
$ git add README
$ git commit -a -m 'first commit'
$ git remote add origin git@example.org:repo1.git
$ git push origin master</pre>
<p>If it successes, the new repository is created on the git server.</p>
<h3>Use the repository</h3>
<p>Please note that step 1 only need to be done for the first time. After getting the repository to a local directory on the user&#8217;s local machine, the user only need to follow step 2 to step 5.</p>
<p>1. Clone the repository for the first-time. You only need to do it once for the first time, for the later usage of this repository, you continue use this local directory.</p>
<pre>$ git clone git@example.org:repo1.git</pre>
<p>A directory named repo1 will be created in the current directory.</p>
<p>If you want to use the repository directory in the previous section, just add these line to the end of <em>.git/config</em>:</p>
<pre>[branch "master"]
remote = origin
merge = refs/heads/master</pre>
<p>2. Pull the updates made before by you or the others. Use <em>&#8220;git pull&#8221;</em> command in the repository’s directory.</p>
<pre>$ cd repo1
$ git pull</pre>
<p>Then you can work on this updated copy of the repository by editing the files.</p>
<p>If you add a file or directory (for example, add directory a/b and file a/t.txt), you can add it to the repository by:</p>
<pre>$ git add a/b a/t.txt</pre>
<p>3. Commit the changes made by you with a message</p>
<pre>$ git commit -a -m 'update the files'</pre>
<p>4. Push it to the git server</p>
<pre>$ git push</pre>
<p>By now, your changes have been pushed to the git server. When the others use &#8220;<em>git pull&#8221;</em> command, they will get the new version of the source codes that have changed by you.</p>
<p>You can use <em>&#8220;git log&#8221;</em> to see the logs of all the commits of this repository.</p>
<p>You may be also interested in more <a href="http://fclose.com/b/linux/2481/git-solutions/">git solutions</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/3358/howto-for-new-git-user/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Taking Screenshot in MPlayer</title>
		<link>http://fclose.com/b/linux/2990/taking-screenshot-in-mplayer/</link>
		<comments>http://fclose.com/b/linux/2990/taking-screenshot-in-mplayer/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 16:24:20 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fclose.com/b/?p=2990</guid>
		<description><![CDATA[Taking screenshots in mplayer is simple. mplayer can also take continuous snapshots. Enable screenshot filter When we want to take screenshots when playing video, first we need to set the &#8220;-vf screenshot&#8221; option: $ mplayer -vf screenshot video.file If we want to enable the screenshot filter by default, we may put the option by adding [...]]]></description>
			<content:encoded><![CDATA[<p>Taking screenshots in mplayer is simple. mplayer can also take continuous snapshots.</p>
<h3>Enable screenshot filter</h3>
<p>When we want to take screenshots when playing video, first we need to set the &#8220;-vf screenshot&#8221; option:</p>
<pre>$ mplayer <strong>-vf screenshot</strong> video.file</pre>
<p>If we want to enable the screenshot filter by default, we may put the option by adding one line into ~/.mplayer/config :</p>
<pre>vf=screenshot</pre>
<h3>To take a single screenshot</h3>
<p>Just press &#8216;<strong>s</strong>&#8216;.</p>
<h3>To take continuous screenshots</h3>
<p>To start taking continuous screenshots, press &#8216;<strong>S</strong>&#8216;; press &#8216;<strong>S</strong>&#8216; again to stop.</p>
<p>Remember to stop it, otherwise mplayer will keep taking screenshots.</p>
<p>Screenshots will be stored under the current directory with name &#8220;shot00001.png&#8221;, &#8220;shot00002.png&#8221;, and so on.</p>
<p>That&#8217;s quite easy, right? Then enjoy it~</p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/2990/taking-screenshot-in-mplayer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Compress/Uncompress Files in Linux Using gzip, bzip2, 7z, rar and zip</title>
		<link>http://fclose.com/b/linux/2939/how-to-compressuncompress-files-in-linux-using-gzip-bzip2-7z-rar-and-zip/</link>
		<comments>http://fclose.com/b/linux/2939/how-to-compressuncompress-files-in-linux-using-gzip-bzip2-7z-rar-and-zip/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 14:25:59 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fclose.com/b/?p=2939</guid>
		<description><![CDATA[Compress/uncompress files are frequent operations. The normal tools for compressing/uncompressing in Linux is gzip, bzip2, 7z, rar and zip. This post introduces how to compress and uncompress file in Linux using these tools. We use best compressing rate with all these tools and mark the options for &#8220;best rate&#8221; in bold fonts. We can delete [...]]]></description>
			<content:encoded><![CDATA[<p>Compress/uncompress files are frequent operations. The normal tools for compressing/uncompressing in Linux is gzip, bzip2, 7z, rar and zip. This post introduces how to compress and uncompress file in Linux using these tools. We use best compressing rate with all these tools and mark the options for &#8220;best rate&#8221; in bold fonts. We can delete these options if we don&#8217;t so care about the size of the compressed file and want a faster compressing.</p>
<p>The example we use here is to compress a directory dir <strong>recursively</strong> into a compressed file with particular file extension which specifies the compressing method.</p>
<h3>gzip</h3>
<p>Compress</p>
<pre>gzip -r <strong>--best</strong> -c dir &gt; ./dir.gz</pre>
<p>Uncompress</p>
<pre>unzip ./dir.gz</pre>
<h3>bzip2</h3>
<p>Compress</p>
<pre> tar -c dir | bzip2 <strong>--best</strong> -c dir &gt; ./dir.tar.bz2</pre>
<p>Uncompress</p>
<pre>tar xf ./dir.tar.bz2</pre>
<h3>7z</h3>
<p>Compress</p>
<pre>7za <strong>-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on</strong> a ./dir.7z dir</pre>
<p>Uncompress</p>
<pre>7za x ./dir.7z
</pre>
<h3>RAR</h3>
<p>Compress</p>
<pre>rar <strong>-m5</strong> a ./dir.rar dir</pre>
<p>Uncompress</p>
<pre>rar x ./dir.rar
</pre>
<h3>ZIP</h3>
<p>Compress</p>
<pre>zip -r <strong>-9</strong> ./dir.zip dir</pre>
<p>Uncompress</p>
<pre>unzip ./dir.zip
</pre>
<p>We can delete the options in black fonts for faster compressing and shorter command line instead of best compressing rate.</p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/2939/how-to-compressuncompress-files-in-linux-using-gzip-bzip2-7z-rar-and-zip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Man Pages</title>
		<link>http://fclose.com/b/linux/2791/linux-man-pages/</link>
		<comments>http://fclose.com/b/linux/2791/linux-man-pages/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 04:07:22 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://fclose.com/b/?p=2791</guid>
		<description><![CDATA[A HTML version Linux man pages: http://fclose.com/p/linux/man/ The man pages in this site is updated to Nov 17, 2010 from Fedora 12.]]></description>
			<content:encoded><![CDATA[<p>A HTML version Linux man pages:</p>
<p><a href="http://fclose.com/p/linux/man/">http://fclose.com/p/linux/man/</a></p>
<p>The man pages in this site is updated to Nov 17, 2010 from Fedora 12.</p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/2791/linux-man-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pkill and pgrep: Process Management Commands</title>
		<link>http://fclose.com/b/linux/2662/pkill-and-pgrep-process-management-commands/</link>
		<comments>http://fclose.com/b/linux/2662/pkill-and-pgrep-process-management-commands/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 04:37:10 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[pkill]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2662</guid>
		<description><![CDATA[This is a introduction to *nix&#8217;s process management tools: pkill and pgrep. As this site&#8217;s domain name was pkill.info, a introduction to pkill should exist here. NAME pgrep, pkill &#8211; look up or signal processes based on name and other attributes SYNOPSIS pgrep [-flvx] [-d delimiter] [-n&#124;-o] [-P ppid,...] [-g pgrp,...] [-s sid,...] [-u euid,...] [...]]]></description>
			<content:encoded><![CDATA[<p>This is a introduction to *nix&#8217;s process management tools: pkill and pgrep. As this site&#8217;s domain name was pkill.info, a introduction to pkill should exist here.</p>
<h3>NAME</h3>
<p><strong>pgrep, pkill</strong> &#8211; look up or signal processes based on name and other attributes</p>
<h3>SYNOPSIS</h3>
<pre>pgrep [-flvx] [-d delimiter] [-n|-o] [-P ppid,...] [-g pgrp,...]
[-s sid,...] [-u euid,...] [-U uid,...] [-G gid,...]
[-t term,...] [pattern]

pkill [-signal] [-fvx] [-n|-o] [-P ppid,...] [-g pgrp,...]
[-s sid,...] [-u euid,...] [-U uid,...] [-G gid,...]
[-t term,...] [pattern]</pre>
<h3>DESCRIPTION</h3>
<p>pgrep  looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout.  All the criteria have to match.  For example,</p>
<pre>pgrep -u root sshd</pre>
<p>will only list the processes called sshd AND owned by root.  On the other hand,</p>
<pre>pgrep -u root,daemon</pre>
<p>will list the processes owned by root OR daemon.</p>
<p>pkill will send the specified signal (by default SIGTERM) to each process instead of listing them on stdout.</p>
<h3>OPTIONS</h3>
<p><strong>-d</strong> delimiter<br />
Sets the string used to delimit each process ID in the output (by default a newline).  (pgrep only.)</p>
<p><strong>-f</strong> The pattern is normally only matched against the process name.  When -f is set, the full command  line  is used.</p>
<p><strong>-g</strong> pgrp,&#8230;<br />
Only  match  processes  in  the  process  group IDs listed.  Process group 0 is translated into pgrep’s or pkill’s own process group.</p>
<p><strong>-G</strong> gid,&#8230;<br />
Only match processes whose real group ID is listed.  Either the numerical or symbolical value may be used.</p>
<p><strong>-l</strong> List the process name as well as the process ID. (pgrep only.)</p>
<p><strong>-n</strong> Select only the newest (most recently started) of the matching processes.</p>
<p><strong>-o</strong> Select only the oldest (least recently started) of the matching processes.</p>
<p><strong>-P</strong> ppid,&#8230;<br />
Only match processes whose parent process ID is listed.</p>
<p><strong>-s</strong> sid,&#8230;<br />
Only  match  processes  whose  process  session  ID is listed.  Session ID 0 is translated into pgrep’s or pkill’s own session ID.</p>
<p><strong>-t</strong> term,&#8230;<br />
Only match processes whose controlling terminal is listed.  The terminal name should be specified  without the &#8220;/dev/&#8221; prefix.</p>
<p><strong>-u</strong> euid,&#8230;<br />
Only  match  processes whose effective user ID is listed.  Either the numerical or symbolical value may be used.</p>
<p><strong>-U</strong> uid,&#8230;<br />
Only match processes whose real user ID is listed.  Either the numerical or symbolical value may be  used.</p>
<p><strong>-v</strong> Negates the matching.</p>
<p><strong>-x</strong> Only match processes whose name (or command line if -f is specified) exactly match the pattern.</p>
<p><strong>-signal</strong><br />
Defines the signal to send to each matched process.  Either the numeric or the symbolic signal name can be used.  (pkill only.)</p>
<h3>OPERANDS</h3>
<p><strong>pattern</strong><br />
Specifies an Extended Regular Expression for matching against the process names or command lines.</p>
<h3>EXAMPLES</h3>
<p>Example 1: Find the process ID of the named daemon:</p>
<pre>unix$ pgrep -u root named</pre>
<p>Example 2: Make syslog reread its configuration file:</p>
<pre>unix$ pkill -HUP syslogd</pre>
<p>Example 3: Give detailed information on all xterm processes:</p>
<pre>unix$ ps -fp $(pgrep -d, -x xterm)</pre>
<p>Example 4: Make all netscape processes run nicer:</p>
<pre>unix$ renice +4 ‘pgrep netscape‘</pre>
<h3>EXIT STATUS</h3>
<p>0      One or more processes matched the criteria.</p>
<p>1      No processes matched.</p>
<p>2      Syntax error in the command line.</p>
<p>3      Fatal error: out of memory etc.</p>
<h3>NOTES</h3>
<p>The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat.   Use the -f option to match against the complete command line, /proc/pid/cmdline.</p>
<p>The running pgrep or pkill process will never report itself as a match.</p>
<h3>BUGS</h3>
<p>The options -n and -o and -v can not be combined.  Let me know if you need to do this.</p>
<p>Defunct processes are reported.</p>
<h3>SEE ALSO</h3>
<p>ps(1) regex(7) signal(7) killall(1) skill(1) kill(1) kill(2)</p>
<h3>STANDARDS</h3>
<p>pkill and pgrep were introduced in Sun’s Solaris 7.  This implementation is fully compatible.</p>
<h3>AUTHOR</h3>
<p>Kjetil Torgrim Homme &lt;kjetilho@ifi.uio.no&gt;</p>
<p>Albert Cahalan &lt;albert@users.sf.net&gt; is the current maintainer of the procps package.</p>
<p>Please send bug reports to &lt;procps-feedback@lists.sf.net&gt;</p>
<p>From Linux User’s Manual.</p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/2662/pkill-and-pgrep-process-management-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Solutions</title>
		<link>http://fclose.com/b/linux/2481/git-solutions/</link>
		<comments>http://fclose.com/b/linux/2481/git-solutions/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 16:39:49 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Client config]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Server config]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2481</guid>
		<description><![CDATA[Solutions to git server construction and management are summarised in this post. The post is keeping updating while new solutions is added to this site. Set up git server Setting Up Git Server using Gitosis Set up Git Server Through SSH Connection Git repositories management Managing Repositories on Git Server Using Gitosis Setting Up Git [...]]]></description>
			<content:encoded><![CDATA[<p>Solutions to git server construction and management are summarised in this post. The post is keeping updating while new solutions is added to this site.</p>
<h3>Set up git server</h3>
<p><a href="http://fclose.com/b/1432/setting-up-git-server-using-gitosis/">Setting Up Git Server using Gitosis</a></p>
<p><a href="http://fclose.com/b/366/set-up-git-server-through-ssh-connection/">Set up Git Server Through SSH Connection</a></p>
<h3>Git repositories management</h3>
<p><a href="http://fclose.com/b/1434/managing-repositories-on-git-server-using-gitosis/">Managing Repositories on Git Server Using Gitosis</a></p>
<p><a href="http://fclose.com/b/1473/setting-up-git-commit-email-notification/">Setting Up Git Commit Email Notification</a></p>
<h3>Use Git</h3>
<p><a href="http://fclose.com/b/2845/how-to-revert-changes-in-git/">How to Revert Changes in Git</a></p>
<p><a href="http://fclose.com/b/linux/3358/howto-for-new-git-user/">Howto for New Git User</a></p>
<p><span style="font-size: x-small;"><strong>Update history</strong><br />
Dec. 24, 2010: Add &#8220;Use Git&#8221; section and add &#8220;revert changes&#8221;.<br />
Oct. 13, 2011. Add howto for new git users<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://fclose.com/b/linux/2481/git-solutions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

