OReilly - Linux Cookbook (2004).pdf
(
8284 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
The Linux Cookbook: Tips and Techniques for Everyday Use:
The Linux Cookbook: Tips and Techniques for Everyday Use:
Table of Contents
The
Linux
Cookbook:
Tips
and
Techniques
for
Everyday
Use
.....................................................................1
Preface.
...............................................................................................................................................................3
1.0
Format
of
Recipes .
...........................................................................................................................4
1.1
Assumptions,
Scope,
and
Exclusions
..............................................................................................5
1.2
Typographical
Conventions .
............................................................................................................6
1.3
Versions,
Latest
Edition,
and
Errata .
...............................................................................................7
1.4
Acknowledgments.
...........................................................................................................................8
PART
ONE:
Working
with
Linux.
................................................................................................................10
2.
Introduction.
................................................................................................................................................11
2.1
Background
and
History .
...............................................................................................................11
2.1.1
What's
Unix?.
.................................................................................................................11
2.1.2
What's
Free
Software? .
..................................................................................................12
2.1.3
What's
Open
Source? .
....................................................................................................13
2.1.4
What's
Linux? .
...............................................................................................................14
2.1.5
What's
Debian? .
.............................................................................................................14
2.1.6
Unix
and
the
Tools
Philosophy.
.....................................................................................15
2.2
What
to
Try
First.
...........................................................................................................................17
2.3
If
You
Need
More
Help .
................................................................................................................18
3.
What
Every
Linux
User
Knows.
................................................................................................................20
3.1
Controlling
Power
to
the
System .
..................................................................................................20
3.1.1
Powering
Up
the
System.
...............................................................................................21
3.1.2
Turning
Off
the
System .
................................................................................................21
3.2
Accounts
and
Privileges.
................................................................................................................21
3.2.1
Logging
In
to
the
System.
..............................................................................................22
3.2.2
Logging
Out
of
the
System .
...........................................................................................24
3.3
Console
Basics .
..............................................................................................................................24
3.3.1
Switching
between
Consoles .
........................................................................................25
3.3.2
Scrolling
the
Console
Text .
...........................................................................................26
3.3.3
Keys
for
Console
Manipulation .
....................................................................................26
3.4
Running
a
Command .
....................................................................................................................27
3.5
Changing
Your
Password .
.............................................................................................................28
3.6
Listing
User
Activity .
....................................................................................................................29
3.6.1
Listing
Your
Username.
.................................................................................................29
3.6.2
Listing
Who
Is
on
the
System.
.......................................................................................30
3.6.3
Listing
Who
Is
on
and
What
They're
Doing .
.................................................................30
3.6.4
Listing
the
Last
Times
a
User
Logged
In .
.....................................................................31
3.7
Listing
System
Activity .
................................................................................................................32
3.7.1
Listing
Your
Current
Processes .
....................................................................................32
3.7.2
Listing
All
of
a
User's
Processes .
..................................................................................33
3.7.3
Listing
All
Processes
on
the
System.
.............................................................................33
3.7.4
Listing
Processes
by
Name
or
Number..
........................................................................34
3.8
Help
Facilities .
...............................................................................................................................34
3.8.1
Finding
the
Right
Tool
for
the
Job.
................................................................................35
i
The Linux Cookbook: Tips and Techniques for Everyday Use:
Table of Contents
3.8.2
Listing
a
Description
of
a
Program.
...............................................................................36
3.8.3
Listing
the
Usage
of
a
Tool..
..........................................................................................36
3.8.4
Reading
a
Page
from
the
System
Manual .
.....................................................................37
3.8.5
Using
the
GNU
Info
System .
.........................................................................................38
3.8.6
Reading
System
Documentation
and
Help
Files
...........................................................40
4.
The
Shell .
.....................................................................................................................................................42
4.1
Keys
for
Command
Line
Editing.
..................................................................................................42
4.1.1
Passing
Special
Characters
to
Commands .
....................................................................44
4.1.2
Letting
the
Shell
Complete
What
You
Type
.................................................................45
4.1.3
Repeating
the
Last
Command
You
Typed.
....................................................................46
4.1.4
Running
a
List
of
Commands .
.......................................................................................47
4.2
Redirecting
Input
and
Output.
........................................................................................................47
4.2.1
Redirecting
Input
to
a
File .
............................................................................................48
4.2.2
Redirecting
Output
to
a
File..
.........................................................................................48
4.2.3
Redirecting
Error
Messages
to
a
File.
............................................................................49
4.2.4
Redirecting
Output
to
Another
Command's
Input .
........................................................49
4.3
Managing
Jobs .
..............................................................................................................................50
4.3.1
Suspending
a
Job
...........................................................................................................50
4.3.2
Putting
a
Job
in
the
Background .
...................................................................................51
4.3.3
Putting
a
Job
in
the
Foreground .
....................................................................................52
4.3.4
Listing
Your
Jobs.
..........................................................................................................52
4.3.5
Stopping
a
Job..
..............................................................................................................53
4.4
Command
History.
.........................................................................................................................53
4.4.1
Viewing
Your
Command
History.
.................................................................................54
4.4.2
Specifying
a
Command
from
Your
History..
.................................................................55
4.5
Recording
a
Shell
Session.
.............................................................................................................55
4.6
Customizing
Your
Shell.
................................................................................................................56
4.6.1
Changing
the
Shell
Prompt .
...........................................................................................57
4.6.2
Making
a
Command
Alias .
............................................................................................58
4.6.3
Adding
to
Your
Path .
.....................................................................................................59
4.6.4
Customizing
Future
Shells.
............................................................................................59
5.
The
X
Window
System
...............................................................................................................................62
5.1
Running
X .
.....................................................................................................................................62
5.1.1
Starting
X .
......................................................................................................................65
5.1.2
Stopping
X .
....................................................................................................................65
5.2
Running
a
Program
in
X .
...............................................................................................................66
5.2.1
Specifying
Window
Size
and
Location .
........................................................................67
5.2.2
Specifying
Window
Colors..
..........................................................................................69
5.2.3
Specifying
Window
Font .
..............................................................................................69
5.2.4
Specifying
Additional
Window
Attributes .
...................................................................70
5.3
Manipulating
X
Client
Windows .
..................................................................................................70
5.3.1
Moving
a
Window .
........................................................................................................71
5.3.2
Resizing
a
Window .
.......................................................................................................71
5.3.3
Destroying
a
Window .
...................................................................................................71
5.3.4
Minimizing
a
Window .
..................................................................................................72
ii
The Linux Cookbook: Tips and Techniques for Everyday Use:
Table of Contents
5.3.5
Maximizing
a
Window .
.................................................................................................72
5.4
Moving
around
the
Desktop.
..........................................................................................................72
5.5
Running
a
Shell
in
X.
.....................................................................................................................73
5.6
Configuring
X .
...............................................................................................................................74
5.6.1
Switching
between
Video
Modes .
.................................................................................74
5.6.2
Running
X
Clients
Automatically..
................................................................................75
5.6.3
Changing
the
Root
Window
Parameters..
......................................................................75
5.6.4
Choosing
a
Window
Manager .
......................................................................................76
PART
TWO:
Files..
.........................................................................................................................................78
6.
Files
and
Directories .
..................................................................................................................................79
6.1
Naming
Files
and
Directories .
.......................................................................................................83
6.1.1
Making
an
Empty
File .
..................................................................................................84
6.1.2
Making
a
Directory .
.......................................................................................................84
6.1.3
Making
a
Directory
Tree..
..............................................................................................85
6.2
Changing
Directories .
....................................................................................................................85
6.2.1
Changing
to
Your
Home
Directory
...............................................................................86
6.2.2
Changing
to
the
Last
Directory
You
Visited .
................................................................86
6.2.3
Getting
the
Name
of
the
Current
Directory .
..................................................................86
6.3
Listing
Directories .
........................................................................................................................87
6.3.1
Listing
File
Attributes .
...................................................................................................88
6.3.2
Listing
Directories
Recursively .
....................................................................................89
6.3.3
Listing
Newest
Files
First .
.............................................................................................90
6.3.4
Listing
Hidden
Files..
.....................................................................................................90
6.3.5
Listing
Directories
in
Color .
..........................................................................................91
6.3.6
Listing
Directory
Tree
Graphs .
......................................................................................91
6.3.7
Additional
Directory
Listing
Options .
...........................................................................92
6.4
Copying
Files
and
Directories .
......................................................................................................93
6.5
Moving
Files
and
Directories..
.......................................................................................................94
6.5.1
Changing
File
Names
to
Lowercase .
.............................................................................95
6.5.2
Renaming
Multiple
Files
with
the
Same
Extension..
.....................................................96
6.6
Removing
Files
and
Directories..
...................................................................................................97
6.6.1
Removing
a
File
with
a
Strange
Name .
.........................................................................98
6.6.2
A
Safe
Way
to
Remove
a
File
.......................................................................................99
6.7
Giving
a
File
More
than
One
Name.
..............................................................................................99
6.8
Specifying
File
Names
with
Patterns .
..........................................................................................100
6.9
Browsing
Files .
............................................................................................................................102
7.
Sharing
Files .
.............................................................................................................................................103
7.1
Groups
and
How
to
Work
in
Them.
.............................................................................................103
7.1.1
Listing
the
Groups
a
User
Belongs
To..
.......................................................................103
7.1.2
Listing
the
Members
of
a
Group.
.................................................................................104
7.2
File
Ownership.
............................................................................................................................105
7.2.1
Determining
the
Ownership
of
a
File .
.........................................................................105
7.2.2
Changing
the
Ownership
of
a
File .
..............................................................................105
7.3
Controlling
Access
to
Files.
.........................................................................................................106
iii
The Linux Cookbook: Tips and Techniques for Everyday Use:
Table of Contents
7.3.1
Listing
the
Permissions
of
a
File.
.................................................................................107
7.3.2
Changing
the
Permissions
of
a
File .
............................................................................108
7.3.3
Write−Protecting
a
File.
...............................................................................................108
7.3.4
Making
a
File
Private.
..................................................................................................109
7.3.5
Making
a
File
Public.
...................................................................................................109
7.3.6
Making
a
File
Executable .
...........................................................................................110
8.
Finding
Files .
.............................................................................................................................................111
8.1
Finding
All
Files
That
Match
a
Pattern .
......................................................................................111
8.2
Finding
Files
in
a
Directory
Tree.
................................................................................................112
8.2.1
Finding
Files
in
a
Directory
Tree
by
Name .
................................................................112
8.2.2
Finding
Files
in
a
Directory
Tree
by
Size.
...................................................................114
8.2.3
Finding
Files
in
a
Directory
Tree
by
Modification
Time .
...........................................115
8.2.4
Finding
Files
in
a
Directory
Tree
by
Owner.
...............................................................116
8.2.5
Running
Commands
on
the
Files
You
Find..
...............................................................117
8.2.6
Finding
Files
by
Multiple
Criteria .
..............................................................................117
8.3
Finding
Files
in
Directory
Listings .
.............................................................................................120
8.3.1
Finding
the
Largest
Files
in
a
Directory .
.....................................................................120
8.3.2
Finding
the
Smallest
Files
in
a
Directory .
...................................................................121
8.3.3
Finding
the
Smallest
Directories..
................................................................................121
8.3.4
Finding
the
Largest
Directories .
..................................................................................121
8.3.5
Finding
the
Number
of
Files
in
a
Listing..
...................................................................122
8.4
Finding
Where
a
Command
Is
Located .
......................................................................................123
9.
Managing
Files .
.........................................................................................................................................124
9.1
Determining
File
Type
and
Format..
............................................................................................124
9.2
Changing
File
Modification
Time .
..............................................................................................125
9.3
Splitting
a
File
into
Smaller
Ones.
...............................................................................................126
9.4
Comparing
Files.
..........................................................................................................................127
9.4.1
Determining
Whether
Two
Files
Differ..
.....................................................................127
9.4.2
Finding
the
Differences
between
Files .
.......................................................................127
9.4.3
Patching
a
File
with
a
Difference
Report..
...................................................................128
9.5
Compressed
Files .
........................................................................................................................129
9.5.1
Compressing
a
File .
.....................................................................................................129
9.5.2
Decompressing
a
File.
..................................................................................................129
9.6
File
Archives.
...............................................................................................................................130
9.6.1
Creating
a
File
Archive.
...............................................................................................131
9.6.2
Listing
the
Contents
of
an
Archive .
.............................................................................131
9.6.3
Extracting
Files
from
an
Archive..
...............................................................................132
9.7
Tracking
Revisions
to
a
File .
.......................................................................................................133
9.7.1
Checking
In
a
File
Revision..
.......................................................................................133
9.7.2
Checking
Out
a
File
Revision .
.....................................................................................135
9.7.3
Viewing
a
File's
Revision
Log.
....................................................................................136
PART
THREE:
Text.
....................................................................................................................................137
10.
Viewing
Text.
...........................................................................................................................................138
iv
Plik z chomika:
seo0
Inne pliki z tego folderu:
O'Reilly - ActionScript Cookbook.chm
(1387 KB)
O'Reilly - Access 2007 The Missing Manual.pdf
(44664 KB)
O'Reilly - Access 2007 - The Missing Manual.chm
(16629 KB)
O'Reilly - Access 2003 Personal Trainer.chm
(9367 KB)
O'Reilly - Access 2007 For Starters - The Missing Manual.chm
(6952 KB)
Inne foldery tego chomika:
! .net c#
C sharp
Zgłoś jeśli
naruszono regulamin