On Sun, 20 Mar 2005 20:42, Roger Searle wrote: > I have some partitions newly mounted in /windows - /windows/G and > /windows/H - folders I created myself. I am browsing the partitions > mounted there as I would expect to be able to. > > I notice that all the previously created folders in /windows have a > "clone folder" with the lowercase letter - /windows/C has /windows/c > etc. So I used mkdir to create /windows/G and /windows/H, then tried > to create the links but realise I don't really know what I'm doing. > > SuSEbox:/windows # dir > total 96 > drwxr-xr-x 10 root root 4096 2005-03-20 19:46 . > drwxr-xr-x 24 root root 4096 2005-03-20 19:44 .. > lrwxrwxrwx 1 root root 1 2004-08-31 07:52 c -> C > dr-xr-xr-x 1 root users 4096 2005-03-20 08:02 C > lrwxrwxrwx 1 root root 1 2004-08-31 07:52 d -> D > drwxrwxr-x 28 root users 16384 1970-01-01 12:00 D > lrwxrwxrwx 1 root root 1 2004-08-31 07:52 e -> E > dr-xr-xr-x 1 root users 12288 2005-03-20 08:02 E > lrwxrwxrwx 1 root root 1 2004-08-31 07:52 f -> F > drwxrwxr-x 6 root users 16384 1970-01-01 12:00 F > drwxr-xr-x 2 root root 4096 2005-03-20 19:49 g > drwxrwxr-x 13 root users 16384 1970-01-01 12:00 G > drwxr-xr-x 2 root root 4096 2005-03-20 19:50 h > drwxrwxr-x 5 root users 16384 1970-01-01 12:00 H > > > Colour coding for the link info is green for the lowercase directory, > blue for the others. I partially understand what this is showing me. > The folders I created are directories (drwxrwxr-x) rather than links > (lrwxr-xr-x). The permissions on the folders I created are wrong - > following the example above I need to end up with rwxrwxr-x. I > understand this terminology and that this is the same as 775. > > The links I created aren't right. For the ones already there (c -> C, d > -> D etc) clicking c in Konqueror shows the contents of C. But if I > click g I don't see the contents of G, I see G itself. The command I > had used was ln -s /windows/G /windows/g > > So my questions... > > Do I even need these lowercase folder links? How do I delete these > links given I have not created them correctly - is simply deleting the > link folder the way to do it? How do I create these linked folders > correctly (if I need them at all)? How do I assign the correct > permissions once they have been created? The man page for chmod says > symbolic link permissions is not changed by chmod.
I think your misunderstanding is about he use of the word 'link'. Understandably, because in English the word means 'join two things', whereas in Unix-speak it means 'create an alias'. Thus to create a directory called with an upper-case letter name and a link with a lower-letter one would do the following: [EMAIL PROTECTED] ~/tmp $ mkdir Z # to make the directory [EMAIL PROTECTED] ~/tmp $ ln -s Z z # to create the link or alias [EMAIL PROTECTED] ~/tmp $ ls -l total 0 drwxr-xr-x 2 chris users 6 Mar 21 08:16 Z lrwxrwxrwx 1 chris users 1 Mar 21 08:16 z -> Z Note that you do _not_ create two directories and then link them together. The reason for making an upper case directory and a lower case link to it is simply to pander to the newly arrived MS refugees who are in the habit of assuming that the naming of files and directories is case insensitive. Unix file names are case sensitive and the age-old convention is to use lower-case for everything. Thus the above keeps everybody happy. -- C. S.
