FAQ

I‘m using the date +’%D_%T’ to store Unix system date and time in a shell variable called $_now:

_now=”$(date +’%D_%T’)”
echo $_now

Outputs:
01/20/12_16:10:42

I’d like to replace / and : with _. I’m aware of the following sed command:

sed ‘s/\//_/g
> s/:/_/g’ <<<"$_now"

Outputs:
01_20_12_16_14_09

How do I specify two pattern within the same sed command to replace | and : with _ so that I can get output as 01_20_12_16_10_42?

{ 1 comment }

Linux: Find Out My Machine (Host) Name

by Vivek Gite on January 13, 2011 · 0 comments

How do I find out my server name (machine name) under Linux operating systems using command shell?

{ 0 comments }

How do I install Google Chrome browser under Linux operating systems? How do I install google-chrome-beta_current_amd64.deb or google-chrome-beta_current_x86_64.rpm file under Linux?

{ 18 comments }

Gnome Find Drive Serial Number

by Vivek Gite on October 3, 2009 · 4 comments

How do I find out serial number information for my hard disk under Ubuntu Linux Gnome desktop environment?

{ 4 comments }

Bash Script: Read One Character At A Time

by Vivek Gite on September 30, 2009 · 3 comments

I need to count one character at a time from input.txt. How do I read one character at a time under Linux / UNIX bash shell script?

{ 3 comments }

When I run hdparm -tT /dev/sda command under CentOS / RHEL I get the following error on screen:

/dev/sda:
Timing buffered disk reads: 908 MB in 3.00 seconds = 302.39 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device


How do I fix this problem?

{ 0 comments }