[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] attach
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] attach |
Date: |
Sat, 15 Sep 2012 18:54:00 +0100 |
Hi David,
> Maybe this is another argument for adding -d to the ls command. But
> -d conflates not descending into directories with not dereferencing
> symbolic links, so the display (alist) will show links.
That too is probably wanted? If I attach foo that's a symlink to bar by
naming foo then I want foo to continue into the MIME headers, not bar?
> Though I can't get ls to dereference symlinks on Linux, anyway. -H or
> -L should, but /bin/ls -HL still shows me the link.
-H and -L never change the name shown for this reference of the given
inode, they only change whether stat(2) or lstat(2) is used. Also, -H
does a -L but only for explicitly named on the command line arguments.
This is working as I'd expect:
$ ls -l
total 0
-rw-r--r-- 1 ralph ralph 0 2012-09-15 18:49 a
lrwxrwxrwx 1 ralph ralph 1 2012-09-15 18:49 b -> a
$ ls -lL
total 0
-rw-r--r-- 1 ralph ralph 0 2012-09-15 18:49 a
-rw-r--r-- 1 ralph ralph 0 2012-09-15 18:49 b
$ ls -lH
total 0
-rw-r--r-- 1 ralph ralph 0 2012-09-15 18:49 a
lrwxrwxrwx 1 ralph ralph 1 2012-09-15 18:49 b -> a
$ ls -lH a b
-rw-r--r-- 1 ralph ralph 0 2012-09-15 18:49 a
-rw-r--r-- 1 ralph ralph 0 2012-09-15 18:49 b
$
If the `points to' name is wanted then readlink(1) is used.
Cheers, Ralph.