≡ Menu

unix system

Linux / Unix: Sed Substitute Multiple Patterns [ Find & Replace ]

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


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

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


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?
[click to continue…]

UNIX: Find Out the Server Model

How do I find out my UNIX server model? What is my UNIX server model?
[click to continue…]

Linux / UNIX: See If Particular Users Are Logged Into Server

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?
[click to continue…]

Linux: Bash Get Time

How do I get the system time in BASH? How can I get the Linux system using bash shell?
[click to continue…]

Rsnapshot WARNING: Could not lchown() symlink "/path/to/file" Error and Solution

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?
[click to continue…]

Shut Down a Solaris UNIX System

How do I shutdown a Solaris UNIX machine or server using command prompt?
[click to continue…]

HowTo: Restart UNIX System / Server

How do I restart UNIX server or workstation?
[click to continue…]

What is Big Iron UNIX Computer?

Question: Often I read about bigiron on mailing lists and the Internet forum. What is Big Iron and how it is related to UNIX system?
[click to continue…]

Linux / UNIX: Administer The Printer From a Web Browser

Q. How do I administer the printer configured under Linux file and printer server from a web browser?
[click to continue…]

Linux / UNIX Crontab File Location

I login to my UNIX system as a normal user. However, I need to update my cronjob entry. But, I can't find where the crontab file is. How do I find out my crontab file location?
[click to continue…]