Skip to Main Content
Linux in a Nutshell, Fourth Edition
book

Linux in a Nutshell, Fourth Edition

by Ellen Siever, Stephen Figgins, Aaron Weber
June 2003
Beginner to intermediate content levelBeginner to intermediate
944 pages
43h 1m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, Fourth Edition

Syntax

This subsection describes the many symbols peculiar to bash. The topics are arranged as follows:

  • Special files

  • Filename metacharacters

  • Command-line editing

  • Quoting

  • Command forms

  • Redirection forms

  • Coprocesses

Special Files

File

Purpose

/etc/profile

Executed automatically at login.

$HOME/.bash_profile

Executed automatically at login.

$HOME/.bashrc

Executed automatically at shell startup.

$HOME/.bash_logout

Executed automatically at logout.

$HOME/.bash_history

Record of last session’s commands.

$HOME/.inputrc

Initialization file for reading input in an interactive shell.

/etc/passwd

Source of home directories for ~ name abbreviations.

Filename Metacharacters

Characters

Meaning

*

Match any string of zero or more characters.

?

Match any single character.

[ abc ...]

Match any one of the enclosed characters; a hyphen can be used to specify a range (e.g., a-z, A-Z, 0-9).

[! abc ...]

Match any character not among the enclosed characters.

[^ abc ...]

Same as [! abc ...].

{ str1 ,...}

Brace expansion: match any of the enclosed strings.

~ name

HOME directory of user name. With no name, HOME directory of current user.

~+

Current working directory (PWD).

~-

Previous working directory from directory stack (OLDPWD; see also the pushd built-in command).

~+ n

The nth entry in the directory stack, counting from the start of the list with the first entry being 0.

~- n

The nth entry in the directory stack, counting ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
Linux in Action

Linux in Action

David Clinton
Hands-On System Programming with Linux

Hands-On System Programming with Linux

Kaiwan N. Billimoria, Tigran Aivazian
Embedded Linux for Developers

Embedded Linux for Developers

Alexandru Vaduva, Alex González, Chris Simmonds

Publisher Resources

ISBN: 0596004826