making information more accessible
I am writing this thread in the hope that newer users of linux can make use of this 'trick' to make needed information more accessible and also more usable.
I have found that using man pages in the terminal to be cumbersome. That has kept me (until now) from accessing this information that is honestly the best info for linux commands used in the terminal. Then I had a thought "can I make a document of a man page that I could then look at and use in a text editor?" The answer is YES, and it is not hard to do. When the man command is entered it is followed by the linux command that we want to research, such as; Code:
man ls So to make a man doc available to a text editor, we just have to pipe the output to a filename where the output is then sent and saved. Using our ls example, Code:
man ls > manls Based on being in our home directory, manls is now a text file in our home directory that can be opened with our text editor of choice and made available when we are working with that particular command. I have made these text files that for me are commonly used commands in the terminal Code:
ls Code:
cp Code:
mv It is also possible to do the same sort of thing with info files. these pages are like man pages, but with additional explanation. Just use this command still using ls as an example; Code:
info ls > infols I love the results of this work and hope others can use this trick to improve 'info access' efforts. |
Interesting perspective. If I need to work with a manual, I just open another terminal. Personally, I find no utility in saving the same info to another format but I get that some people are not entirely comfortable working at the command line. I just don't see the difference between a text file and a man page.
Having said that, there is more than one way to skin a cat, as they say, so the ability to do things like this is what gives us open source operating system users our power :) |
I think I would likely just use screen if I were looking to configure a machine and read man pages.
However, as above, what works for you works for you and may help others.:) |
You should look into TLDR (which has a number of command-line clients) and cheat.sh. Both of which are designed to get you the information you need more efficiently than manpages.
As for the problem you're trying to solve, though: surely that could be better solved by using a terminal (possibly in combination with a multiplexer) that supports splits and tabs, or by opening two terminals? I mean, if the pager is properly set up, you have colored sections in the manpages. If you just open the same pages in a text editor, you lose that. If you use Konqueror, you can also open the ls manpage by entering "man:ls" in the address bar. IIRC. |
Thank you all very much for the input. True, more than one way to 'skin a cat' and I am not putting this out there as the only option. I now have some other methods, and that is great.
|
2 Attachment(s)
Reading manpages in the terminal does not have to be cumbersome. For starters, You can use / to start searching for something in most pagers and searching is case-insensitive by default. You can also enable colors to make manpages more readable if you use less:
Code:
man () And some editors such as Emacs come with their own man viewer - you don't have leave the comfort of your editor and use editor's keybindings to read the manpage. |
I like to do:
Code:
export MANPAGER=most |
Why is most better than less?
|
It's in color out of the box, without needing any further configuration.
|
Well, indeed it is. Maybe I should switch and slim down my ~/.bashrc?
|
@OP:
yeah, I'd just open another terminal. But graphical man page readers exist - Xman for example. |
For a more readable / searchable version, i like https://linux.die.net/man/.
However, it may not be definitive for the exact version you are using, but I normally find it's good enough. HTH |
All times are GMT -5. The time now is 09:31 AM. |