nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] attach

2012-09-15 12:54:19
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.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>