5 ms·
Now I'm wondering why ldd doesn't offer this feature in the first place.
by chjj 5y ago
Now I'm wondering why ldd doesn't offer this feature in the first place.
- jcranmer 5y agoThe output format isn't nice, but LD_DEBUG=files will tell you which file requested each library. (The LD_DEBUG environment option is a useful tool in the rare circumstances when you really, really need help debugging the library loading process.)
- IshKebab 5y agoBecause it's a core Linux tool and they basically never change. Why doesn't ps have an option to only show your processes? Why doesn't objdump tell you what all the symbol flags mean so I don't have to look them up on StackOverflow every time? I'm sure there are better examples but there are a ton of ways the usability of the Linux CLI could be improved but nobody is going to bother because everything's written in horrible C and to contribute you'd have to join some mailing list and convince a load of stuck-in-the-mud it-was-hard-for-me-so-I'm-not-making-it-easy-for-you neckbeards that your change won't break compatibility on a PDP-11, and anyway what's the problem? You just run `ps -fu $(whoami) | less`. Easy. Way easier and more fun to write a new tool.
- rerx 5y agoI agree that the interface of ps is awful with its two conflicting ways to define options, but `ps u` does show all your processes on Linux. I usually type `ps fux` to get a nice tree. Sadly that's Linux-specific and doesn't work on the Mac.
- IshKebab 5y ago`ps u` just changes the output format. It's not the same as `ps -u $(whoami)`
- rerx 5y agoYou are right! I misremembered. It's `ps x`. From `man ps`: x Lift the BSD-style "must have a tty" restriction, which is imposed upon the set of all processes when some BSD-style (without "-") options are used or when the ps personality setting is BSD-like. The set of processes selected in this manner is in addition to the set of processes selected by other means. An alternate description is that this option causes ps to list all processes owned by you (same EUID as ps), or to list all processes when used together with the a option.
- teddyh 5y ago> Why doesn't ps have an option to only show your processes? Because that is the default behavior.
- sillysaurusx 5y agoTrees are quite hard to do well in a CLI app. Everything from the Unicode drawing to the sizing to the color choices. This one looks great.
- jldugger 5y agojust saying: pstree figured it out
- monocasa 5y agoIt's not like ldd is a paragon of cli design to begin with. Indentation isn't difficult, you just pass in the indentation level and increment as needed as you recursively walk the tree.
- chjj 5y agoUnicode isn't necessary if the terminal supports ACS.
- eklitzke 5y agoWhat is ACS?
- chjj 5y agoMost terminals (even non-unicode-capable ones) offer a feature to switch into "alt charset mode" which provides glyphs for drawing lines.
- sillysaurusx 5y agoThanks! It’s getting rare to learn about a feature that surprises me, but I had no idea about this.
- monocasa 5y agoYou can do a passable job with just + - and | if you need to. Have done that for a ucontroller's cli.