unix system

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?

{ 3 comments }

How do I find out my UNIX server model? What is my UNIX server model?

{ 5 comments }

How do I see if my friends or coworkers are logged into the same Linux or BSD or UNIX (AIX, HP-UX, Apple OS X) server / workstation as I am from a command line?

{ 1 comment }

Linux: Bash Get Time

by on October 27, 2010 · 1 comment

How do I get the system time in BASH? How can I get the Linux system using bash shell?

{ 1 comment }

I got rsnapshot based backup server up and running for my network under Debian Linux 5.x. But, whenever I run a backup job using the following command:

rsnapshot -v -c /root/rsnapshot.server1.conf hourly
I get the following messages on screen:

WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/locate”
WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/nc.1.gz”
WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/jexec-binfmt”
WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/servertool”

How do I fix this problem?

{ 3 comments }

How do I shutdown a Solaris UNIX machine or server using command prompt?

{ 1 comment }