UNIX

I‘ve installed memcached server under Linux but it is still showing old data. How do I flush the contents of a Memcached instance / server?

{ 1 comment }

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 }

Can you tell me differences between the following sysvinit /sbin/service command:

service httpd restart

service httpd condrestart

service httpd reload

{ 0 comments }

I‘m running the Mediawiki software under Apache web server running on the Unix operating systems. I’m getting the following in my php error log:

PHP Fatal error: Cannot redeclare wfProfileIn() (previously declared in /var/www/html/wiki/includes/profiler/Profiler.php:14) in /var/www/html/wiki/includes/ProfilerStub.php on line 25.

How do I fix this problem under Mediawiki version 1.18.0?

{ 0 comments }

Linux / Unix curl: Pass HTTP Referer

by Vivek Gite on November 6, 2011 · 0 comments

How do I pass the referrer (HTTP referrer)as an HTTP header field using curl command under Linux OR Unix operating systems?

{ 0 comments }

How do I play files in random order using the mplayer command line player under Linux / Unix operating systems?

{ 7 comments }

Bash Shell: Find Out If a Variable Is Set or Not

by Vivek Gite on September 25, 2011 · 1 comment

How do I check if a bash shell variable called $input is defined or not under BSD / Apple OS X / Unix / Linux like operating systems?

{ 1 comment }