Manuals and Guides

Forum rules
Before you post please read how to get help
User avatar
Oscar799
Level 19
Level 19
Posts: 9433
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Manuals and Guides

Postby Oscar799 » Wed Jul 13, 2011 1:47 pm

Image
"Don't fix it if it ain't broken,don't break it if you can't fix it" Husse
Registered Linux User #511789

User avatar
SimonTS
Level 6
Level 6
Posts: 1271
Joined: Thu Feb 24, 2011 5:19 pm
Location: Bristol, United Kingdom

Re: Manuals and Guides

Postby SimonTS » Wed Jul 13, 2011 3:00 pm

Looks like Habitual has got his wish for a basic programming section then? I'm sure he'll be a happy little bunny now, stop him getting quite so bored when everything is working properly. :mrgreen:

User avatar
MALsPa
Level 8
Level 8
Posts: 2053
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: Manuals and Guides

Postby MALsPa » Wed Jul 13, 2011 3:09 pm

For folks who don't mind digging through manpages, don't forget:

Code: Select all

man bash

User avatar
rich_roast
Level 6
Level 6
Posts: 1131
Joined: Sat Sep 05, 2009 4:37 pm

Re: Manuals and Guides

Postby rich_roast » Wed Jul 13, 2011 5:19 pm

man is actually pretty versatile.

Code: Select all

man --regex
lets you sift through manpages for a given topic, which is handy if you forgot the actual command you're looking for. For example

Code: Select all

man --regex pdf
will bring up pretty much anything to do with pdf processing. See

Code: Select all

man man
for more. I admit that part of me just wanted to post a command that looks recursive.

User avatar
Habitual
Level 12
Level 12
Posts: 4203
Joined: Sun Nov 21, 2010 8:31 pm
Location: Youngstown, Ohio

Re: Manuals and Guides

Postby Habitual » Wed Jul 13, 2011 9:40 pm

rich_roast wrote:

Code: Select all

man --regex pdf


Very clever. +1
Windows assumes you're an idiot.
Linux demands proof of it.

User avatar
Habitual
Level 12
Level 12
Posts: 4203
Joined: Sun Nov 21, 2010 8:31 pm
Location: Youngstown, Ohio

Re: Manuals and Guides

Postby Habitual » Wed Jul 13, 2011 9:50 pm

Windows assumes you're an idiot.
Linux demands proof of it.

User avatar
samriggs
Level 5
Level 5
Posts: 953
Joined: Sun Apr 24, 2011 6:09 pm
Location: Canada
Contact:

Re: Manuals and Guides

Postby samriggs » Thu Jul 14, 2011 1:57 pm

Downloaded the pdf one, wish more would put them into pdf's instead of just online manuals :(

Gives me a start anyhow :D
Sam
Thanks again for this
"Windows: the worst system for the most money, Linux: the best system for free"
Registered Linux User #545430
Arch Cinnamon / Mint Cinnamon

User avatar
rich_roast
Level 6
Level 6
Posts: 1131
Joined: Sat Sep 05, 2009 4:37 pm

Re: Manuals and Guides

Postby rich_roast » Thu Jul 14, 2011 3:16 pm

I think doxygen can do the conversion but it's not a trivial download (subject to dependencies) so you might be better off just downloading pdf's :)

User avatar
samriggs
Level 5
Level 5
Posts: 953
Joined: Sun Apr 24, 2011 6:09 pm
Location: Canada
Contact:

Re: Manuals and Guides

Postby samriggs » Thu Jul 14, 2011 3:38 pm

rich_roast wrote:I think doxygen can do the conversion but it's not a trivial download (subject to dependencies) so you might be better off just downloading pdf's :)


I got the gnu bash manual figured it might be a good place to start, plus I have to keep going on the other language I'm studying so it should be enough for now :D

I'm going to check this out anyhow because a lot of time I like some online manuals but would rather have them to read at my leasure on the desktop instead.
Thanks for this :)
Much appreciated.
Cool just check the software manager its in there .
Sam
"Windows: the worst system for the most money, Linux: the best system for free"
Registered Linux User #545430
Arch Cinnamon / Mint Cinnamon

User avatar
richyrich
Level 17
Level 17
Posts: 7189
Joined: Mon May 04, 2009 8:31 pm

Re: Manuals and Guides

Postby richyrich » Thu Jul 21, 2011 1:40 pm

/usr/share/doc/bash/ . . and the multiple sub-folders.

User avatar
viking777
Level 14
Level 14
Posts: 5138
Joined: Mon Dec 01, 2008 11:21 am

Re: Manuals and Guides

Postby viking777 » Sun Sep 11, 2011 11:58 am

Here is a little bit of fun if you are interested in learning the command line:

I was going to upload a shell script here but the forum doesn't allow sh extensions so you will just have to have the contents of it instead and make your own script if you want (or run the command from the terminal if you don't).

Code: Select all

#!/bin/bash

man $(ls /bin | shuf | head -1)


I would love to say it was all my own work, but of course it wasn't, I stole it from someone else :lol:

I bet you learn something from it though. I even thought that you could use it to replace 'mintfortunes' but I am not sure I want it running every time I start a shell, so I just turned it into a script I can call when I feel like it.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).

User avatar
xenopeek
Level 23
Level 23
Posts: 19379
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Manuals and Guides

Postby xenopeek » Sun Sep 11, 2011 12:34 pm

Cool! I've replaced the man with whatis, so I can find some interesting commands. Adding it to terminal .bashrc.

Code: Select all

whatis  $(ls /bin | shuf | head -1)

I didn't know about shuf yet...

To get a long list;

Code: Select all

ls /bin | xargs whatis
Image

User avatar
viking777
Level 14
Level 14
Posts: 5138
Joined: Mon Dec 01, 2008 11:21 am

Re: Manuals and Guides

Postby viking777 » Sun Sep 11, 2011 2:40 pm

Vincent Vermeulen wrote:Cool! I've replaced the man with whatis, so I can find some interesting commands. Adding it to terminal .bashrc.

Code: Select all

whatis  $(ls /bin | shuf | head -1)

I didn't know about shuf yet...

To get a long list;

Code: Select all

ls /bin | xargs whatis


Yes, I like that a lot, :D gives just a one or two line output that you can look at if you want to, but don't have to. Better than mint fortunes by far. It took some adapting to my fish shell I can tell you, but I got it going in the end :)

One of the obscure commands I had to use to get it to work was

Code: Select all

rev
have a look at that in the man pages. Pipe it to cut and it allows you to remove characters from the end of a file then 'rev' it again to get the original output back. (Believe me this - or something like it - is necessary in Fish because of the way it runs the 'ls' command with the -F switch permanently on). So my command looks like this:

Code: Select all

whatis (ls /bin |rev|cut -b 2-|rev| shuf | head -1)


And that has to be pasted into ~/.config/fish/config.fish - which doesn't exist so you have to create it :lol: . Still worth the trouble though, the fish shell absolutely rocks!
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).

User avatar
xenopeek
Level 23
Level 23
Posts: 19379
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Manuals and Guides

Postby xenopeek » Mon Sep 12, 2011 2:56 pm

I was about to write you should include the /usr/bin commands, but found out you can easily ask whatis for all the commands it knows:

Code: Select all

whatis -s 1 -w \*

This did however return 1,672 commands on my system :shock: I need some more Linux training :lol:
Image

User avatar
viking777
Level 14
Level 14
Posts: 5138
Joined: Mon Dec 01, 2008 11:21 am

Re: Manuals and Guides

Postby viking777 » Tue Sep 13, 2011 5:45 am

Vincent Vermeulen wrote:I was about to write you should include the /usr/bin commands, but found out you can easily ask whatis for all the commands it knows:

Code: Select all

whatis -s 1 -w \*

This did however return 1,672 commands on my system :shock: I need some more Linux training :lol:

I beat you I got 1731! (That is annoying actually I have only memorised 1700 of them :wink: )

How did you get the line count from the terminal output btw? The only way I could think of is to redirect the output to a file and then use

Code: Select all

wc -l
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).

User avatar
xenopeek
Level 23
Level 23
Posts: 19379
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Manuals and Guides

Postby xenopeek » Tue Sep 13, 2011 6:29 am

viking777 wrote:
Vincent Vermeulen wrote:I was about to write you should include the /usr/bin commands, but found out you can easily ask whatis for all the commands it knows:

Code: Select all

whatis -s 1 -w \*

This did however return 1,672 commands on my system :shock: I need some more Linux training :lol:

I beat you I got 1731! (That is annoying actually I have only memorised 1700 of them :wink: )

How did you get the line count from the terminal output btw? The only way I could think of is to redirect the output to a file and then use

Code: Select all

wc -l

You don't know the pipe operator :shock: You can pipe the output of one command into the input of another with the | pipe operator, as so:

Code: Select all

whatis -s 1 -w \* | wc -l
Image

User avatar
viking777
Level 14
Level 14
Posts: 5138
Joined: Mon Dec 01, 2008 11:21 am

Re: Manuals and Guides

Postby viking777 » Tue Sep 13, 2011 6:32 am

:oops: :oops:

When I memorised that 1700th command I forgot the first :lol:
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).

User avatar
vrkalak
Level 12
Level 12
Posts: 4429
Joined: Mon Jul 20, 2009 5:53 pm
Location: Santa Fe, NM, USA

Re: Manuals and Guides

Postby vrkalak » Tue Oct 11, 2011 11:58 pm

Aliens BASH Tutorial > http://www.subsignal.org/doc/AliensBashTutorial.html

For me, this is the most comprehensive 'bash' tutorial - I have seen. Explains everything, in detail.
Image
:: Debian-Sid (Xfce/Fluxbox) :: LinuxMint-18 (LTS) LXDE w/Openbox ::
Registered Linux User: #497031 :: My DeviantART Page

User avatar
xenopeek
Level 23
Level 23
Posts: 19379
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Manuals and Guides

Postby xenopeek » Tue Mar 06, 2012 9:51 am

Tip of the week; while reading a manpage in the terminal I often find I want to try something on the terminal. No need to open another terminal, just press Ctrl+Z to move the manpage to the background and you can access your terminal again. Type "fg" to move the manpage from the background back to the foreground and continue reading 8)
Image

baptiste
Level 3
Level 3
Posts: 104
Joined: Sun Jan 22, 2012 12:25 am

Re: Manuals and Guides

Postby baptiste » Wed Oct 31, 2012 8:54 pm

Interesting!
I guess I could use this when viewing something with less, too.
(though most times I'm using a tabbed and maximized terminal window)

Beginners tips : pipe your impossibly long stuff into 'less' so you can sanely view it (with page up/down, etc., press 'Q' to quit).
commandwithalongoutput | less, and sometimes commandwithalongoutput | sort | less

Hit CTRL-U to clear a line of text you were typing, and especially clear a password you've typed wrong.


Return to “Scripts & Bash”

Who is online

Users browsing this forum: No registered users and 1 guest