Archive for year 2010
Simple usage of sed command
Aug 17th
The following examples show you how sed command can be used as a powerful alternative to general commands like head, tail etc.
Let us consider the below input file for all the examples explained here.
[neo@techpulp ~]# cat input.txt Line1 Line2 Line3 Line4 Line5 Line6 Line7 Line8 Line9 Line10 Line11 Line12 Line13 Line14 Line15 Line16 Line17 Line18 Line19 Line20 [neo@techpulp ~]#
Print all lines
[neo@techpulp ~]# sed -e '' input.txt Line1 Line2 Line3 Line4 Line5 Line6 Line7 Line8 Line9 Line10 Line11 Line12 Line13 Line14 Line15 Line16 Line17 Line18 Line19 Line20 [neo@techpulp ~]#
Do not print first 10 lines of input. Here “d” stands for deletion.
[neo@techpulp ~]# More >
How to resolve xinetd startup errors in Linux
Apr 13th
The best way to solve any service start up errors in Linux is to run them manually with debug mode on. The difficulty comes from finding exact command line arguments to be passed (as if it were started by Linux start up scripts) and also disabling default daemon mode for the server command. You can easily find the options to enable debug mode for the server by quickly looking at man page.
For example, you can use following command to run xinetd service in the foreground with debug on.
[root@techpulp ~]# /usr/sbin/xinetd -d -dontfork
10/4/13@00:34:14: DEBUG: 3657 {handle_includedir} Reading included configuration file: /etc/xinetd.d/chargen-dgram More > What is the best alternative to WinZip
Jan 18th
If you are tired of commerical software WinZip, The best free software alternative to WinZip is 7-zip.
In fact 7-zip is better than WinZip as it supports more formats like BZIP2, RPM etc along with its own format 7z.
7-zip in Windows
The 7-zip can create archives of following formats.
- 7z, ZIP, GZIP, BZIP2 and TAR
The 7-zip application can unzip following formats
- 7z, ZIP, GZIP, BZIP2 and TAR
- ARJ, CAB, CHM, CPIO, DEB, DMG, HFS, ISO, LZH, LZMA, MSI, NSIS, RAR, RPM, UDF, WIM, XAR and Z.
This is best compatible with UNIX flavours as it supports the archives seen on UNIX systems like GZIP, TAR, BZIP2, More >
How to install VLC Media Player on Fedora
Jan 17th
Fedora doesn’t distribute VLC media player as part its core and updates. So you need download rpms from rpmfusion.org as shown below.
[root@techpulp ~]# rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm [root@techpulp ~]# yum install -y vlc [root@techpulp ~]# yum install -y mozilla-vlc
Off the above, installing mozilla-vlc is optional as it installs a browser plug-in for Mozilla/Firefox Browser.
How to retain RPMs downloaded by yum
Jan 16th
Generally yum deletes all RPMs it downloads right after installing them. If you want to save Internet bandwidth and have multiple systems to be updated, you can make yum to keep the RPMs it downloads.
The highlighted line in /etc/yum.conf file can be edited to enable yum keep the cache of RPMs.
[main] cachedir=/var/cache/yum #keepcache=0 keepcache=1 ..
The “keepcache=1” tells yum to not remoe downloaded RPMs. But where are those downloaded RPMS? You can see “cachedir” line in /etc/yum.conf and that is the base directory where yum keeps the RPMs. In this case the cache directory is “/var/cache/yum“.
You can use “find” command as shown below More >


Recent Comments