Linux

How to Get the Newest Release of Packages on CentOS

Posted on
With the original yum repo, you can only get the stablest version of packages like the following output:[root@localhost ~]# cat /etc/centos-releaseCentOS release 6.4 (Final)[root@localhost ~]# yum info httpd…Available PackagesName        : httpdArch        : x86_64Version     : 2.2.15…[root@localhost ~]# yum info mysql…Available PackagesName        : mysqlArch     […]
Linux

How to Comment Out a Huge Block of Shell Code

Posted on
You might want to comment out some lines of shell script code during debug-time, you can just add a pound sign # to the head of each line like this:$ vi simple_code.sh#!/bin/bashline 1line 2#line 3#line 4line 5line 6In the above code, line 3 and 4 are commented out, it’s an easy and simple work. But […]
Linux

Irix Mode vs. Solaris Mode in Top Command

Posted on
On Solaris, the top command always takes all cpu usage as a maximum 100%, no matter how many cpus are there on the board. In a case of 4 processors on a server, any single process listed on top command will not exceed 25% of overall cpu usage. This is the well-known “Solaris Mode”. The […]
Linux

How to Remove No-Name or Empty-Name Files

Posted on
After you finish your shell scripting, you’d like to try your scripts to see the result in your test environment. In the debug phase, you will generate a lot of echo message to see where’s problems, and maybe you will get some unrecognized files, like this: $ ls -il total 5     709233 -rw-r–r– […]