Bill Anderson wrote:
Bob S wrote:
Hello SuSE users,
While searching for files in /usr/bin I noticed something that seems odd to me. There is a folder in there named X11. It is a link to the same folder. If you open it, it shows the exact same thing as /usr/bin. You can continue opening the X11 directory until you have a /usr/bin//X11/X11/X11/X11 file open on ad-infitum. They all show the exact same files and megabytes. What is this? Can somebody explain the purpose?
Bob S
Not sure of the reason, but it only impacts on the logical path pwd -L. The physical path (pwd -P) remains as /usr/bin. The impact is to have all X11 binaries appear in /usr/bin instead of /usr/bin/X11. Like many symbolic links, it makes the applications happy even when the underlying structure changes. For those of us who use UNIX, we are used to /bin being a symbolic link to /usr/bin,
since when? there are several programs which have always been in /bin because they are needed in runlevel 0 and run level S, neither of which have /usr mounted, but which are not administrative only, (and thus do NOT reside in /sbin or /usr/sbin). Since the early 1990s, /bin has been a symbolic link to /usr/bin. If you go to runlevel S, you will find that there are a minimal number of utilities in /usr/bin. These are hidden if you have a separate mount for /usr. The intent was for /usr to be a static directory.
examples being: cp, chown, dd, grep, awk, cat, chmod, chgrp, date, kill, ln, ls, mount, umount, rm, rmdir, sed, stty, tar, shells (sh/ksh/csh/tcsh/bash), false, true, uname, ed, ex, vi I think you need to get on a Unix box, and check out the actual structure. Linux has never followed this path, and holds to the old Unix structure. I have been working with Unix since 1978, and have been
Aaron Kulkis wrote: through a number of file structure changes. The point is that symbolic links are used to for backwards compatibility. As a side light, a number of the utilities that you mention are now shell built-ins, which take precedence over the equivalent command. For example, pwd is a built-in that has the -L and -P options for ksh and bash. The /usr/bin command does not have these options, and exists for Bourne shell compatibility. You might also note that under Linux it is /usr/bin/sh, /usr/bin/ksh, and /bin/bash. Most people are not aware that the default behavior for ksh and bash is to show the logical path, so that cd .. behaves as expected. It is the shell that tracks the logical path. The system calls still refer to the physical path, as does /bin/pwd. For those interested in understanding this behavior try cd -P /usr/tmp and then do the pwd command. The shell built-in for cd also support the -P and -L options. Bill Anderson WW7BA -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org