Saturday, December 26, 2009

Why daemon ?

Neil

Does anyone know why processes that run and wait for input are called Daemons? Just curious.

neil markwick

DAEMON
------
/day'mn/ or /dee'mn/ (From the mythological meaning, later rationalised as the acronym "Disk And Execution MONitor") A program that is not invoked explicitly, but lies dormant waiting for some condition(s) to occur. The idea is that the perpetrator of the condition need not be aware that a daemon is lurking (though often a program will commit an action only because it knows that it will implicitly invoke a daemon).

For example, under ITS writing a file on the LPT spooler's directory would invoke the spooling daemon, which would then print the file. The advantage is that programs wanting files printed need neither compete for access to, nor understand any idiosyncrasies of, the LPT. They simply enter their implicit requests and let the daemon decide what to do with them. Daemons are usually spawned automatically by the system, and may either live forever or be regenerated at intervals.

Unix systems run many daemons, chiefly to handle requests for services from other hosts on a network. Most of these are now started as required by a single real daemon, inetd, rather than running continuously. Examples are cron (local timed command execution), rshd (remote command
execution), rlogind and telnetd (remote login), ftpd, nfsd (file transfer), lpd (printing).

Tuesday, December 15, 2009

/etc/resolv.conf

Ex:-

search domain.tld west.domain.tld
domain domain.tld
nameserver ip address

see man resolv.conf

digg - command line dns client

dig similar to nslookup in batch mode, by default returns more information than nslookup

dig mx vtc.com

dig mail.yahoo.com ubuntu.com
dig @192.168.220.2 www.vtc.com

how to trace delegation using dig ?

ex:- dig +trace mail.yahoo.com

typing dig with no option , does a look up on the root of the namespace

Thursday, December 10, 2009

How to change target of a symbolic link ?

dandyrandy


Is it possible to change the target of a symbolic link?

What I currently have is:
/home/Data1
/home/Data2
/home/Stores

In the Stores directory, I did: ln -s /home/Data1 /home/Stores/abc
$ pwd
/home/Stores
$ ls -latr
lrwxrwxrwx 1 dandy dandy 46 Feb 12 16:38 abc -> /home/Data1

I want to now change that target to:
abc -> /home/Data2

BUT, I don't want to do have to delete the link and re-create it to the new target. I just want to rename/change/modify the target. Is it possible?


fimblo

I normally delete the symlink and re-create it on one line, minimizing the time the link does not exist:

rm mysymlink ; ln -s mytargetfile mysymlink

I suppose you could write a little hack which does it in one go, but I've never heard of one which is included in standard POSIX systems...

shamrock

ln -s /home/Data1 /home/Stores/abc
ln -f -s /home/Data2 /home/Stores/abc


see:- http://en.wikibooks.org/wiki/LPI_Linux_Certification/Create_&_Change_Hard_&_Symbolic_Links

Wednesday, December 9, 2009