Наши партнеры

Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

8.4. Implementation

8.4.1. System startup

Boot from the diskset in the usual way and log in as root.

8.4.2. Test the "more" script

Display kernel messages by piping the output of dmesg to more.

bash# dmesg | more

Examine the local_fs script by using more with a command-line argument.

bash# more /etc/init.d/local_fs

8.4.3. Use ps to show running processes

Display processes for the user currently logged in.

bash# ps

Display all available information about all running processes.

bash# ps -ef

8.4.4. Run a simple sed script

Use sed to display an alternate version of /etc/passwd.

bash# sed -e "s/Legacy/Old School/" /etc/passwd

Verify that sed did not make the changes permanent.

bash# cat /etc/passwd

8.4.5. Test the "ed" editor

Use ed to change properties on the "daemon" user.

bash# ed -p*
ed* r /etc/passwd
ed* %p
ed* /daemon/s/Legacy/Old School/
ed* %p
ed* w
ed* q

Verify that the changes are permanent (at least until the system is restarted.)

bash# cat /etc/passwd

8.4.6. System shutdown

Bring the system down gracefully with the shutdown command.