Lately I've discovered that the latex and pdftex (with some other one) binaries in Ubuntu are the same:lrwxrwxrwx  1 root root          6  29 18:03 latex -> pdftex*lrwxrwxrwx  1 root root          6  29 18:03 pdflatex -> pdftex*lrwxrwxrwx  1 root root          6  17 20:22 pdfcslatex -> pdftex*Executing all without any options yields different results; so, my assumption they use argv[0].What is the advantage of using argv[0] instead of compiling several binaries? And what other usages of argv[0] is possible?
Usage of the argv[0]
command line;compiling
It results in smaller overall executable size when there is a lot of shared functionality.  This is taken to the extreme by busybox, which has hundreds of size-optimized commands all linked in to the same binary and distinguished via argv[0].There are only two other useful ways of using it that I'm aware of:It is handy to use it in help messages showing command line usage so that the help references the same command that the user used even if the binary is symlinked or renamed under a different name to its originalSome programs write into it to provide a way of showing status feedback that will show up in ps.