Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-08-2013, 02:05 AM   #1
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, 02:15 AM   #2
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,087

Rep: Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141Reputation: 4141
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, 04:32 AM   #3
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,261

Rep: Reputation: 315Reputation: 315Reputation: 315Reputation: 315
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.


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 07:55 PM
Symbolic link not allowed or link target not accessible rheluser Linux - Server 3 09-04-2012 10:22 AM
symbolic link not allowed or link target not accessible paullaubscher Linux - Newbie 4 03-10-2010 06:47 AM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
Symbolic link bwaynej2002 Linux - General 8 08-25-2003 10:06 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:23 AM.

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