3 ms·
> -L (dereference ALL symlinks) is not implemented; don't see why you'd ever want to follow all symlinks. Instead, -L prevents showing the symlink targets in -l
by Sophira 2y ago
> -L (dereference ALL symlinks) is not implemented; don't see why you'd ever want to follow all symlinks. Instead, -L prevents showing the symlink targets in -l.
I can tell you why I use -L in normal "ls" - to see destination sizes.
I often use symlinks to deduplicate files but still have them in relevant places. For example, I may want to keep the original filename but also have it available via a "friendlier" name too, or I may want to categorise files without loving them, etc.
In a similar vein, I also make "source trees" of ISO images that I want to build (using mkisofs) for use in emulators and such using symlinks, because I don't want to take up too much space but they're easy to handle.
In both cases, being able to occasionally see sizes of the destination files (instead of the symlink itself) can be very useful, particularly if I'm sorting by size (-S -r) or want to make a quick estimation on whether two files are the same file or not (although in that case having the size display in bytes is also useful to me. GNU is has the -h flag to show human-readable sizes, though).
Anyway, thought you might be interested in this viewpoint! This looks very nifty.
- arp242 2y agoAh cheers, that's helpful! I don't really use symlinks that extensively myself (at least not in that way). I implemented it in an earlier version; one reason I removed it is so I can re-use -L for "don't show link target" because I had a symlink with a very long link target. The -w to set column width and/or -trim to not wrap to the next line solve the same problem, so this option is now somewhat redundant (or at least, doesn't need a short one-letter "quick to type" flag). I'll probably put the standard -L behaviour back.