≡ Menu


I need to replace special characters with equivalent hexadecimal unicode under Linux or Unix like operating system. How do I list or find out unicodes for given characters?
[click to continue…]

I am login to a remote server using a ssh client. I am annoyed with the arrow key behavior during insert mode in Vim. As soon as I hit arrow keys, vim display A B C D on screen. How do I fix this problem under Linux, FreeBSD, OpenBSD, NetBSD, Apple OS X or Unix-like operating systems? How can I fix arrow keys that display A B C D on remote shell?
[click to continue…]

How do I use the rsync tool to copy only the hidden files and directory (such as ~/.ssh/, ~/.foo, and so on) from /home/jobs directory to the /mnt/usb directory under Unix like operating system?
[click to continue…]

Linux / Unix: sed Command Print Only Matching Lines

I see many examples and man pages on how to do operations like search-and-replace using sed. But, I want to match a given string or a regular pattern expression and display on the screen. How do I print lines with matching pattern using sed command only under Unix like operating systems?
[click to continue…]

HowTo: Install firefox-15.0.tar.bz2 in Linux

Idownloaded Firefox version 15.0 from mozilla ftp server. The name of file is firefox-15.0.tar.bz2. How do I install Firefox under any Debian / Ubuntu / Fedora or any Linux distribution?
[click to continue…]

I often type the wrong command as follows under Linux bash shell:
rsync -av dir1 user@server1.cyberciti.biz:/path/to/dir1
cp -av file1*.txt file2*.txt /path/to/dest

I need to correct those command as follows:

rsync -av dir5 user@server1.cyberciti.biz:/path/to/dir1
cp -av delta1*.txt delta2*.txt /path/to/dest

How do I replace dir1 with dir5 or file with delta and repeat the last command under bash shell?
[click to continue…]

I got over 100s of HTML files in the following format:

 <title>Statistics for ABC LTD - January 2007 - Rang IDXYZZAZZZZ</title>
<body BGCOLOR="#E8E8E8" TEXT="#000000" LINK="#0000FF" VLINK="#FF0000">
<h2>Statistics for ABC LTF</h2>
Summary Period: January 2007<br />
Generated 01-Feb-2007 06:40 CET<br />
<hr />
<font SIZE="-1"></font></p></center><pre>
my data 1
my data 2
my data 3
my data 10000
my data N times

Generated by MyAppDbStatsWriter (UNIX) version 1.9b2

How do I extract text between two words (<PRE> and </PRE>) in unix or linux using grep command?
[click to continue…]