≡ Menu


Linux / Unix: Unicode and HTML Characters Lookup By Name or Number

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…]

Linux / Unix Command To Optimize and Compress PNG Files In Bulk

I have lots of images in png format (over 250k+ png). Properly formatting and compressing png images can save many bytes of data. How do I compress and optimize png images on my amazon cloud account so that I can save bandwidth on cloudfront cdn account? How do I use an image compressor to create lossless compression on PNG files, with no effect on image quality in bulk using Red Hat Enterprise Linux bash shell?
[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…]

yum Command: List The Contents (Files) Of A Package

The rpm -qi command list the files of a package. How do I use yum command to list the contents of a package under CentOS or RHEL installed on IBM server hardware?
[click to continue…]

HowTo: Listen Pandora In Europe ( Outside USA )

I have Pandora Internet Radio One subscription, and recently I moved to Europe for a few months as part of my work schedule. The service fully available only in the United States. How do I access Pandora one service in Europe? Can I get around it by using a proxy server installed on my own server located in USA at home or ISP data center?
[click to continue…]

Linux / Unix: Rsync Copy Hidden Dot Files and Directories Only

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: Find Out DNS Server IP Address / Names

How do I find out my DNS server IP address assiged my my ISP under Unix or Linux operating system using command prompt? How do I find preferred dns server under Debian / Ubuntu / Fedora Linux desktop system?
[click to continue…]

Bash History: Correct / Repeat The Last Command With a Substitution

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…]

HowTo: grep Text Between Two Words in Unix / Linux

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>
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…]

TCSH / CSH: set vs setenv Command Differences

I‘ve recently started to use FreeBSD operating system with tcsh (c shell clone) shell. I noticed that both set and setenv command set shell user environment. What’s the difference between the SET and SETENV commands?
[click to continue…]