Hot answers tagged

50

kill [ -s signal | -p ] This syntax in a manual page means: You can use kill -s signal or you can use kill -p, but you can't use both -s and -p at the same time. The pipe (|) stands for (exclusive) or in the documentation, it's not part of the command. When you type foo | bar in your shell, it will attempt to start foo and bar, and pipe the ...


32

I think you're getting tripped on the fact that there is a builtin command to Bash called kill, along with the command kill. $ type -a kill kill is a shell builtin kill is /usr/bin/kill kill is /bin/kill The man page you're reading is referring to the kill command located under /bin. Use the full path to summon it: $ /bin/kill -p sleep 16486 ...


31

Pay attention to the section number: Suppose you want help on printf. there are at least two of them: in shell and in C. The bash version of printf is in section 1, the C version is in section 3 or 3C. If you don't know which one you want, type man -a printf, and all manual pages will be displayed. If what you are looking for is the format of printf with ...


29

Type slash / and then type the string to search for. Then keep pressing n to get to the next item


23

There are too many sources of information to list in this page: The command echo -e uses an extension to render \e as ASCII 27 (octal 33 or "\033"). The portable way to print these uses printf (POSIX). Compare with standard echo (POSIX). Your example can be rewritten as printf "\033[34m Hello\n \033[0m" the standard for the color escapes is ECMA-48 ...


19

man -k search This will give you a list of all man pages which relate to 'search'.


18

You want man 2 open for the C library interface, not man 3 open. It is indeed in manpages-dev (not manpage-dev). man 3 open gives a Perl manual page. # Show the corresponding source groff file man -w 2 open /usr/share/man/man2/open.2.gz # Show which package this file belongs to dpkg -S /usr/share/man/man2/open.2.gz manpages-dev: ...


15

I've found that using Perl's POD is much easier than writing man pages directly, and you can create a man page from the POD file with the pod2man utility (part of the base Perl package). Since some of your executables are already written in Perl, you can add POD formatting directly to your scripts and they can be turned into POD files directly. I've also ...


14

To list active aliases, run: alias To see names of all active functions, run: declare -F To see the names and definitions of all active functions, run: declare -f More The information on aliases is also available is a script-friendly format with: declare -p BASH_ALIASES man bash provides more info on the alias builtin: alias [-p] ...


14

The manpage sections are described in the manpages themselves. Enter man man in a shell session to see the various sections and general content: 1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 ...


14

Even though not a direct answer, git blame and git log reveal that this section was introduced in commit 2c41d783 by a committer called hniksic, who turns out to be Hrvoje Niksic. His eMail-Adress can be found in wget's ChangeLog file (I won't publish it here for the obvious reasons). I'd suggest asking him directly, as he might be the best to give a more ...


13

Yes it would be more consistent. This has nothing to do with cross-platform and everything to do with developers not writing (wanting to write) documentation. a man page is documentation, --help is mostly programming in nature. I've also seen the case where man pages didn't exist because the developer didn't know how to make one, or convert the documentation ...


13

help is a bash built-in, providing help for bash commands only man is the traditional form of help for almost every command on your system, and not only, sometimes also configuration files have their own man page. In Linux distros organized in packages, the relative text is in general provided from the same package providing the command. If you have ...


12

The font is Donald Knuth's Computer Modern. The documentation was no doubt created with LaTeX (or maybe even plain TeX). (Actually, these are both confirmed by the PDF metadata.) (Edit: Poking around a bit more, it looks like, strictly speaking the documentation is created in a base format, which, thanks to GNU texinfo is exported to a variety of formats, ...


11

The apropos utility is seriously handy for finding the appropriate manpage.


11

To get proficient with unix, you will need to work on it regularly. Practise makes perfect. Firstly, I would suggest that you pick a Linux distribution. Don't worry too much about picking the best one for you yet, when you are ready you will find the one. For a beginner, a distro like Ubuntu will be good enough. Problems will arise, be ready for them. Ask ...


11


11

I think you're looking for man command. Try doing man mkdir and look for what the -p switch does. You can use vim style searching here. Use man man for more info on how to use man command.


11

For bash, the primary resource is man bash. For builtins specifically, there is the help builtin. Here is a quote from help printf. In addition to the standard format specifications described in printf(1) and printf(3), printf interprets: %b expand backslash escape sequences in the corresponding argument %q quote the argument in a way ...


10

As @Steven D says, don't forget the info pages. In addition, don't be intimidated by the info pages. I know plenty of people who don't use the info pages because of the built-in navigation system. My favorite solution is to pipe the info pages through less: info gpg |less This way, I can navigate the info pages using my favorite pager. The info pages ...


10

pinfo was designed to emulate the behavior of the lynx web browser and make browsing info pages easier to do. Its interface and formatting abilities are somewhat more advanced than the original info was and it also supports viewing man pages including colorizing them. It has a little bit more understanding of the content it is viewing, and can extract and ...


10

Run type caller and you will see it is a shell built-in. Running help caller will show its function, reported as well in bash's manual page. Briefly Return the context of the current subroutine call.


10

I've been using the RHEL6 docs instead. They're essentially the same. https://access.redhat.com/site/documentation/Red_Hat_Enterprise_Linux/ Here are the CentOS 6 Release Notes, if you're interested. The highlight the above link there as well.


10

The manual is out of date with the program. Try ls --help | grep -- ' -1': -1 list one file per line It is one of the last options described if you just do ls --help.


10

Just to clarify the reason for this further, the manpage is in section 2 because it is a system call (implemented more or less directly as part of the kernel, rather than the C library). This distinction can seem somewhat arbitrary, especially with older system calls that are now library functions (fork is still in section 2 even though it is now a wrapper ...


9

help is a bash command. It uses internal bash structures to store and retrieve information about bash commands. man is a macro set for the troff (via groff) processor. The output of processing a single file is sent to a pager by the man command by default. info is a text-only viewer for archives in the info format output of Texinfo.


9

You can create a simple shell function and place it in your .bashrc: readme() { if [ -e /usr/share/doc/"$1"/README.Debian ]; then "$PAGER" /usr/share/doc/"$1"/README.Debian else echo "No README for $1" fi } Use: $ readme vlc $Id: README.Debian 1436 2008-08-31 23:06:34Z xtophe-guest $ Notes for anyone wanting to build Debian packages of ...


8

I found the LVM HOW-TO to be very clear. It has probably more info than you want from a first-time tutorial, but reading sections 1. to 3. and 11. to 13. should give you a comprehensive introduction to LVM concepts and its usage in live systems; these days, most Linux distribution have good LVM support out-of-the-box, so you can safely skip the ...


8

The signal(7) man page (at least the one I have) shows multiple possible numbers for some of the signals. If you can get kill to list the numbers, they should be correct for the running system. Try: kill -l or kill -L In both cases, that's an "ell" (for "list"), not a "one". Bash's built-in kill -l shows a nice numbered table. Linux's procps kill ...



Only top voted, non community-wiki answers of a minimum length are eligible