@ParadeGrotesque @xhr@mastodon.social yeah, I also didn't know that and I've used Unix since the late 80's.
Since you said that you've used Unix for 25 years, I was surprised it was that old. I checked, and it turns out that it was released 37 years ago. That's pretty impressive.
@loke @ParadeGrotesque Unix is even older. The first version was released beginning of the 1970ies.
@xhr@mastodon.social @ParadeGrotesque yes, I was referring to less, not Unix.
I remember downloading less and installing it on our VAX 11/750 that we had at the local computer club. We were running BSD 4.3 on it.
We may even have installed it on the previous machine we had, that was running SysV. I'm not sure what version.
@loke @ParadeGrotesque Ah, OK. I was mistaken then 😜
VAX and 4.3BSD was before my time.
@xhr@mastodon.social @ParadeGrotesque yeah, I re-read my reply and I understand how it could be misunderstood. In fact, I wrote it really poorly
@_xhr_ TIL!
@_xhr_ is there a way to un-apply all filters?
@musicmatze Press & again and then "enter"
@_xhr_
I use this all the time since discovering it and try to share it regularly.
If you're looking for other obscure corners in less(1)
you can use "-S" (in a running session of less) to toggle between wrapping and not-wrapping long lines. Most toggleable options can do this, so if you pipe ANSI output to less and see a bunch of "ESC" sequences, try typing "-R" to toggle ANSI-sequence processing/display. Or "-i"/"-I" to toggle case-sensitivity in searches.
@ed1conf Awesome, thanks for letting me know. I usually just maximized my terminal window to deal with wrapping lines :)
@ed1conf @xhr@mastodon.social 😟🤦🏽♂️All these years of restarting the command, and I can be toggled in session.😓
@_xhr_ @musicmatze do you know / ?
@f2k1de @musicmatze Not yet 😃 Thanks for letting me know!
@_xhr_ need to try this!
@_xhr_ Nice tip, i didn’t Know. I should read more man.
@jeanmimi You're welcome!
@_xhr_ Btw. negation (with "!") also works in the normal search prompt.
Other useful keys:
- "=" shows info about the current file and its position in the file
- "F" keeps scrolling to the end oft the file (like the "tail" command)
- Escape key followed by "F" works like "F", but stops scrolling when the current search pattern is found - ie. it keeps scrolling until something interesting is found.
@_xhr_
Definitely didn't know this - thanks for sharing!
@paladin1 You're welcome!
@_xhr_ I wonder if threre is already a Rust rewrite of less that has this feature too.
@_xhr_ Thanks so much for that.
I will admit that, till I read this, I was using a version of less too old to have that feature.🙃
@babelcarp You're welcome!
@babelcarp @_xhr_ Aha, that's why I didn't know about this. I swear I read the less man page, but probably 25 years ago
@_xhr_ holy crap
@_xhr_ whoa, I've been using
... | grep «regex» | less
forever.
If it supports PCRE I'll be *so* happy
@scruss Glad, you're welcome!
@yojimbo you're welcome!
> ("&" command within less)
You are kidding me. I've been using Unix for around 40 years (before less, come to that) and this is a new one to me, too.
Thanks! 👍
@vandys you're welcome!
@lanodan one should always have ed at hand :)
@brad you're welcome
@_xhr_ just read this and it made me wonder if i could pipe `tail -f` into fzf and do fuzzy finding in real time. Turns out you can 🤯
@_xhr_ Another cool thing is jumping between the paired parentheses with the (), [] and {} keys. Absolutely great for browsing JSON if you happen to have it open in `less` and not some text editor with this capability exposed in a more obvious way.
A generalized version is Ctrl+Alt+F/B followed by two characters forming a pair to jump between.
@_xhr_ ans today i am one of the lucky 10.000 :D
https://xkcd.com/1053/
Thank you :)
@fuyuhikodate @_xhr_ I remember the day when I was one of the 10,000 who discovered that XKCD had tooltip punchlines!
@_xhr_ Übrigens, dieser eine Toot und die 108 Retoots haben dazu geführt, dass das "less"-Hashtag hier seit gestern dauerhaft in den Trends steht :-D
(das ist wohl eine Änderung in dem ganz neuen #Mastodon 3.4.0: https://github.com/tootsuite/mastodon/pull/16164).
@ollibaba Cool, danke für die Nachricht
@_xhr_ I know, right? Every time I start spending time in console I end up in the man pages.
@moondeer That's good sign. Reading man pages is key!
@_xhr_ Constantly learning new stuff in BSD & Linux like these CLI tips & tricks - keeps stuff new and exciting. Good stuff!
@_xhr_ whaaaattttt.
@_xhr_ I have done this a few times by accident and been very confused by it. The characters & and / are next to each other on my keyboard layout. Now I know! thanks
@reynir You're welcome!
@_xhr_ You keep learning new things. Unix/Linux is pretty friggin vast.
These past 14 days I've learned a lot about Socat, been sharing it with a colleague, and I must admit I am once again amazed at the power of the 'everything is a file' concept.
@RasmusLindegaard socat is a very nice tool. And I assume that most Unix people doesn't know about it, so good that you shared your knowledge.
@_xhr_ It's like magic. But then: The Unix/Linux commandline really is like magic in general.
@_xhr_ thanks to this toot I learned those after 4 years of Unix experience, thanks.
@_xhr_
Well, shoot, I did not know that either! Nice catch!