You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/intro_vi/030_vi_theory.xml
+7-2
Original file line number
Diff line number
Diff line change
@@ -102,8 +102,9 @@
102
102
</tgroup>
103
103
</table>
104
104
</section>
105
-
<section><title>undo and repeat (u .)</title>
106
-
<para>When in command mode, you can undo your mistakes with u. You can do your mistakes twice with . (in other words, the . will repeat your last command).</para>
105
+
<section><title>undo, redo and repeat (u .)</title>
106
+
<para>When in command mode, you can undo your mistakes with u. Use <command>ctrl-r</command> to redo the undo.</para>
107
+
<para>You can do your mistakes twice with . (in other words, the . will repeat your last command).</para>
Copy file name to clipboardExpand all lines: modules/ioredirection/050_ioredirection_solution.xml
+4-4
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ set -C</screen>
6
6
<para>2. Verify that <command>noclobber</command> is active by repeating an <command>ls</command> on <command>/etc/</command> with redirected output to a file.</para>
7
7
<screen>ls /etc > etc.txt
8
8
ls /etc > etc.txt (should not work)</screen>
9
-
<para>4. When listing all shell options, which character represents the <command>noclobber</command> option ?</para>
9
+
<para>3. When listing all shell options, which character represents the <command>noclobber</command> option ?</para>
10
10
<screen>echo $- (noclobber is visible as C)</screen>
11
-
<para>5. Deactivate the <command>noclobber</command> option.</para>
11
+
<para>4. Deactivate the <command>noclobber</command> option.</para>
12
12
<screen>set +o noclobber</screen>
13
-
<para>6. Make sure you have two shells open on the same computer. Create an empty <command>tailing.txt</command> file. Then type <command>tail -f tailing.txt</command>. Use the second shell to <command>append</command> a line of text to that file. Verify that the first shell displays this line.</para>
13
+
<para>5. Make sure you have two shells open on the same computer. Create an empty <command>tailing.txt</command> file. Then type <command>tail -f tailing.txt</command>. Use the second shell to <command>append</command> a line of text to that file. Verify that the first shell displays this line.</para>
14
14
<screen>paul@deb503:~$ > tailing.txt
15
15
paul@deb503:~$ tail -f tailing.txt
16
16
hello
@@ -19,7 +19,7 @@ world
19
19
in the other shell:
20
20
paul@deb503:~$ echo hello >> tailing.txt
21
21
paul@deb503:~$ echo world >> tailing.txt</screen>
22
-
<para>7. Create a file that contains the names of five people. Use <command>cat</command> and output redirection to create the file and use a <command>here document</command> to end the input.</para>
22
+
<para>6. Create a file that contains the names of five people. Use <command>cat</command> and output redirection to create the file and use a <command>here document</command> to end the input.</para>
Copy file name to clipboardExpand all lines: modules/kernel/031_linux_kernel.xml
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
<?hard-pagebreak?>
2
2
<section><title>about the Linux kernel</title>
3
3
<section><title>kernel versions</title>
4
-
<para>In 1991 Linux Torvalds wrote (the first version of) the Linux kernel. He put it online, and other people started contributing code. Over 4000 individuals contributed source code to the latest kernel release (version 2.6.27 in November 2008).</para>
4
+
<para>In 1991 Linus Torvalds wrote (the first version of) the Linux kernel. He put it online, and other people started contributing code. Over 4000 individuals contributed source code to the latest kernel release (version 2.6.27 in November 2008).</para>
5
5
<para>Major Linux kernel versions used to come in even and odd numbers. Versions <command>2.0</command>, <command>2.2</command>, <command>2.4</command> and <command>2.6</command> are considered stable kernel versions. Whereas <command>2.1</command>, <command>2.3</command> and <command>2.5</command> were unstable (read development) versions. Since the release of 2.6.0 in January 2004, all development has been done in the 2.6 tree. There is currently no v2.7.x and according to Linus the even/stable vs odd/development scheme is abandoned forever.</para>
Copy file name to clipboardExpand all lines: modules/logging/030_logging_theory.xml
+1-1
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ root@rhel65:/etc#</screen>
180
180
</section>
181
181
<?hard-pagebreak?>
182
182
<section><title>logger</title>
183
-
<para>The logger command can be used to generate syslog test messages. You can aslo use it in scripts. An example of testing syslogd with the <command>logger</command><indexterm><primary>logger(1)</primary></indexterm> tool.</para>
183
+
<para>The logger command can be used to generate syslog test messages. You can also use it in scripts. An example of testing syslogd with the <command>logger</command><indexterm><primary>logger(1)</primary></indexterm> tool.</para>
<para>The shell is also responsible for <command>file globbing</command><indexterm><primary>file globbing</primary></indexterm> (or dynamic filename generation). This chapter will explain <command>file globbing</command>.</para>
1
+
<para>Typing <command>man 7 glob</command> (on Debian) will tell you that long ago there was a program called <command>/etc/glob</command> that would expand wildcard patterns.</para>
2
+
<para>Today the shell is responsible for <command>file globbing</command><indexterm><primary>file globbing</primary></indexterm> (or dynamic filename generation). This chapter will explain <command>file globbing</command>.</para>
Copy file name to clipboardExpand all lines: modules/storage_devices/030_diskdevices_theory.xml
+22-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
<?hard-pagebreak?>
20
20
<section><title>block device</title>
21
21
<para>Random access hard disk devices have an abstraction layer called <command>block device</command><indexterm><primary>block device</primary></indexterm> to enable formatting in fixed-size (usually 512 bytes) blocks. Blocks can be accessed independent of access to other blocks.</para>
brw-rw----. 1 root disk 8, 2 Apr 19 10:12 /dev/sda2
36
36
brw-rw----. 1 root disk 8, 16 Apr 19 10:12 /dev/sdb
37
37
brw-rw----. 1 root disk 8, 32 Apr 19 10:12 /dev/sdc</screen>
38
+
<para>Virtual devices like <command>raid</command> or <command>lvm</command> are also listed as <command>block devices</command> as seen in this RHEL7 virtual machine.</para>
<para>Note that a <command>character device</command><indexterm><primary>character device</primary></indexterm> is a constant stream of characters, being denoted by a c in <command>ls -l</command>. Note also that the <command>ISO 9660</command> standard for cdrom uses a <command>2048 byte</command> block size.</para>
39
59
<para>Old hard disks (and floppy disks) use <command>cylinder-head-sector</command><indexterm><primary>CHS</primary></indexterm> addressing to access a sector on the disk. Most current disks use <command>LBA (Logical Block Addressing)</command><indexterm><primary>LBA</primary></indexterm>.</para>
40
60
</section>
61
+
<?hard-pagebreak?>
41
62
<section><title>solid state drive</title>
42
63
<para>A <command>solid state drive</command><indexterm><primary>solid state drive</primary></indexterm> or <command>ssd</command><indexterm><primary>ssd</primary></indexterm> is a block device without moving parts. It is comparable to <command>flash memory</command>. An <command>ssd</command> is more expensive than a hard disk, but it typically has a much faster access time.</para>
43
64
<para>In this book we will use the following pictograms for <command>spindle disks</command> (in brown) and <command>solid state disks</command> (in blue).</para>
<para>1. Mount the small 200MB partition on /home/project22.</para>
4
-
<para>2. Mount the big 400MB primary partition on /mnt, the copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
4
+
<para>2. Mount the big 400MB primary partition on /mnt, then copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
5
5
<para>3. Verify your work with <command>fdisk</command>, <command>df</command> and <command>mount</command>. Also look in <command>/etc/mtab</command> and <command>/proc/mounts</command>.</para>
6
6
<para>4. Make both mounts permanent, test that it works.</para>
7
7
<para>5. What happens when you mount a file system on a directory that contains some files ?</para>
Copy file name to clipboardExpand all lines: modules/storage_mounting/050_mounting_solution.xml
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
<para>1. Mount the small 200MB partition on /home/project22.</para>
4
4
<screen>mkdir /home/project22
5
5
mount /dev/sdc1 /home/project22</screen>
6
-
<para>2. Mount the big 400MB primary partition on /mnt, the copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
6
+
<para>2. Mount the big 400MB primary partition on /mnt, then copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
<para>Many Unix and Linux distributions have been using <command>init</command> scripts to start daemons in the same way that <command>Unix System V</command><indexterm><primary>System V</primary></indexterm> did back in 1983.</para>
2
+
<para>Starting 2015 this is considered legacy. Most Linux distributions, including Debian and Red Hat/CentOS, are in the process of migrating to <command>systemd</command>. They will however remain compatible with <command>init</command> because it will take many years before all applications are migrated.</para>
3
+
<para>This chapter explains how to manage Linux with <command>systemd</command>.</para>
0 commit comments