On 2023-03-11 00:39, Bob Rogers wrote:
From: "Carlos E. R." <> Date: Fri, 10 Mar 2023 12:22:33 +0100
On 2023-03-10 09:26, Per Jessen wrote: > Carlos E. R. wrote: > . . . >> For admin work, 'mc' can view or edit text based files: logs, >> scripts, config files... > > Aha, much like vi and less and other pagers. Cool.
Except that I hate vi. Otherwise, no typing, except for edit.
You could use emacs and dired...
Keep going . . . ;-}
:-)
>> Good for browsing several directories and looking >> inside files for the information you need. >> It can do a search of files in trees, including grepping for contents, >> then for example do some operation on the resulting list of files, be >> it copy, move, edit... > > Ah, like a find and grep.
Nope.
Find and grep produces a list of hits, then I have to open the files in another terminal with less (and pasting the file name, with quotes, so as not to disturb the list.
In emacs, FWIW, M-x grep and M-x grep-find give you a list of hits that you can step through or random-access, pulling each hit into another window by turns. No need for other programs (if you don't mind viewing & editing in emacs).
And with emacs (and cheap RAM), I can have as many shells-in-a-buffer as I need, so I set my pager to "cat" and use emacs scrolling & search capabilities instead.
with 'mc' is just F3.
Out of curiousity, what does F3 do in mc?
View the current file. F4 for edit.
>> 'mc' works fine over a remote and slow connection. You may not need it >> because you are used to your own methods, but it does work fine. > > Oh, I've never questioned whether it works, only whether it is > necessary.
Obviously you can do without. It is simply more comfortable and faster. That's not "necessary".
On the contrary, what is most efficient quickly becomes "necessary" -- the more efficient it is over the alternatives, the more necessary.
:-) -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)