LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2013, 03:05 AM   #1
rajendran
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Rep: Reputation: 0
Question Symbolic Link


In ldap,
slaptest is a symbolic link to slapd, in that case, how come different syntax for slaptest and slapd ?

for example,
"slaptest -v -f /path/to/configfile" is used for testing the configuration file.
But to test the configuration file using slapd, "slapd -T test -f /path/to/configfile" is used.

My question is why cant I use the same syntax for both ? because slaptest is a symbolic link to slapd.

Thank you
 
Old 10-08-2013, 03:15 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,483

Rep: Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425
Why should they have similar syntax? In the unix-linux world the commands can recognize themselves and act on their names.
 
Old 10-08-2013, 05:32 AM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
From programmer perspective: when you create some tools, there is often case (for example no need duplicate common code), when you can integrate all these tools in one executable file and invoke specific by, for example: "mytools -T delall" or "mytools -T stop_server". There is also a procedure inside reading filename by what this tool was called and if it will be recognized to automatically invoking specified function, for example if you rename this tool to "delall" it will invoke first tool function, and if you create a link with name "stopserver" it will call second, etc. Executed function depends on filename.

The most notable example is BusyBox, it can do many functions that way (ls, mkdir, rm, cd...), and is usually used in environment with limited resources, like memory and storage size. With separate program to every of this function more memory would be needed.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can I make a symbolic link that is dynamic link->$HOME/file? croog Linux - General 4 10-14-2012 08:55 PM
Symbolic link not allowed or link target not accessible rheluser Linux - Server 3 09-04-2012 11:22 AM
symbolic link not allowed or link target not accessible paullaubscher Linux - Newbie 4 03-10-2010 07:47 AM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 08:40 AM
Symbolic link bwaynej2002 Linux - General 8 08-25-2003 11:06 PM


All times are GMT -5. The time now is 06:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration