0% found this document useful (0 votes)
401 views11 pages

Lab Manage Files From The Command Line

mgt

Uploaded by

Justice Mutemwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
401 views11 pages

Lab Manage Files From The Command Line

mgt

Uploaded by

Justice Mutemwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

9/12/24, 4:48 PM RH124 - ch03s11

Redhat.com (http://www.redhat.com) Support FAQ

Menu Language Search Account Sites

Red Hat System Administration I


Course update
An updated version of this course is available that uses a newer version of Red Hat Enterprise Linux in the lab environment. Therefore, the RHEL 9.0 version of
the lab environment will retire on December 31, 2024. Please complete any work in this lab environment before it is removed on December 31, 2024. For the
most up-to-date version of this course, we recommend moving to the RHEL 9.3 version.

Version 9.0 Translations

A later version of
Table of Contents Course Lab Environment  this course is
available

 Bookmark this page


P 1
(/rol/app/courses/rh124-9.0/pages/pr01) (/rol/app/courses/rh124-9.0/pages/pr01s02) (/rol/app/courses/rh124-9.0/pages/pr01s03) (/rol/app/courses/rh124-9.0/pages/ch01)
(/rol/app/courses/rh124- 2 (/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch01s02) (/rol/app/courses/rh124-9.0/pages/ch01s03) (/rol/app/courses/rh124-9.0/pages/ch02) (/rol/app/courses/rh124-9.0/pages/ch02s02)
9.0/pages/pr01) (/rol/app/courses/rh124- 9.0/pages/ch01)
(/rol/app/courses/rh124-9.0/pages/ch02s03) (/rol/app/courses/rh124-9.0/pages/ch02s04) (/rol/app/courses/rh124-9.0/pages/ch02s05) (/rol/app/courses/rh124-9.0/pages/ch02s06)
9.0/pages/ch02)
3
(/rol/app/courses/rh124-9.0/pages/ch02s07) (/rol/app/courses/rh124-9.0/pages/ch02s08) (/rol/app/courses/rh124-9.0/pages/ch03) (/rol/app/courses/rh124-9.0/pages/ch03s02)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch03s03) (/rol/app/courses/rh124-9.0/pages/ch03s04) (/rol/app/courses/rh124-9.0/pages/ch03s05) (/rol/app/courses/rh124-9.0/pages/ch03s06)
9.0/pages/ch03)
(/rol/app/courses/rh124-9.0/pages/ch03s07) (/rol/app/courses/rh124-9.0/pages/ch03s08) (/rol/app/courses/rh124-9.0/pages/ch03s09) (/rol/app/courses/rh124-9.0/pages/ch03s10)
4
(/rol/app/courses/rh124-9.0/pages/ch03s11) (/rol/app/courses/rh124-9.0/pages/ch03s12) (/rol/app/courses/rh124-9.0/pages/ch04) (/rol/app/courses/rh124-9.0/pages/ch04s02)
(/rol/app/courses/rh124-
5
(/rol/app/courses/rh124-9.0/pages/ch04s03) (/rol/app/courses/rh124-9.0/pages/ch04s04) (/rol/app/courses/rh124-9.0/pages/ch05) (/rol/app/courses/rh124-9.0/pages/ch05s02)
9.0/pages/ch04)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch05s03) (/rol/app/courses/rh124-9.0/pages/ch05s04) (/rol/app/courses/rh124-9.0/pages/ch05s05) (/rol/app/courses/rh124-9.0/pages/ch05s06)
9.0/pages/ch05)
6
(/rol/app/courses/rh124-9.0/pages/ch05s07) (/rol/app/courses/rh124-9.0/pages/ch05s08) (/rol/app/courses/rh124-9.0/pages/ch06) (/rol/app/courses/rh124-9.0/pages/ch06s02)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch06s03) (/rol/app/courses/rh124-9.0/pages/ch06s04) (/rol/app/courses/rh124-9.0/pages/ch06s05) (/rol/app/courses/rh124-9.0/pages/ch06s06)
9.0/pages/ch06)
(/rol/app/courses/rh124-9.0/pages/ch06s07) (/rol/app/courses/rh124-9.0/pages/ch06s08) (/rol/app/courses/rh124-9.0/pages/ch06s09) (/rol/app/courses/rh124-9.0/pages/ch06s10)
7
(/rol/app/courses/rh124-9.0/pages/ch06s11) (/rol/app/courses/rh124-9.0/pages/ch06s12) (/rol/app/courses/rh124-9.0/pages/ch07) (/rol/app/courses/rh124-9.0/pages/ch07s02)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch07s03) (/rol/app/courses/rh124-9.0/pages/ch07s04) (/rol/app/courses/rh124-9.0/pages/ch07s05) (/rol/app/courses/rh124-9.0/pages/ch07s06)
9.0/pages/ch07)
(/rol/app/courses/rh124-9.0/pages/ch07s07) (/rol/app/courses/rh124-9.0/pages/ch07s08) (/rol/app/courses/rh124-9.0/pages/ch08) (/rol/app/courses/rh124-9.0/pages/ch08s02)
https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 1/11
9/12/24, 4:48 PM RH124 - ch03s11
(/rol/app/courses/rh124-9.0/pages/ch08s03) (/rol/app/courses/rh124-9.0/pages/ch08s04) 8 (/rol/app/courses/rh124-9.0/pages/ch08s05) (/rol/app/courses/rh124-9.0/pages/ch08s06)
9
(/rol/app/courses/rh124-9.0/pages/ch08s07) (/rol/app/courses/rh124-9.0/pages/ch08s08) (/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch08s09) (/rol/app/courses/rh124-9.0/pages/ch08s10)
9.0/pages/ch08) (/rol/ap
(/rol/app/courses/rh124-9.0/pages/ch09) (/rol/app/courses/rh124-9.0/pages/ch09s02) (/rol/app/courses/rh124-9.0/pages/ch09s03) (/rol/app/courses/rh124-9.0/pages/ch09s04)
10 9.0/pa
(/rol/app/courses/rh124-9.0/pages/ch09s05) (/rol/app/courses/rh124-9.0/pages/ch09s06) (/rol/app/courses/rh124-9.0/pages/ch10) (/rol/app/courses/rh124-9.0/pages/ch10s02)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch10s03) (/rol/app/courses/rh124-9.0/pages/ch10s04) (/rol/app/courses/rh124-9.0/pages/ch10s05) (/rol/app/courses/rh124-9.0/pages/ch10s06)
9.0/pages/ch10)
11
(/rol/app/courses/rh124-9.0/pages/ch10s07) (/rol/app/courses/rh124-9.0/pages/ch10s08) (/rol/app/courses/rh124-9.0/pages/ch11) (/rol/app/courses/rh124-9.0/pages/ch11s02)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch11s03) (/rol/app/courses/rh124-9.0/pages/ch11s04) (/rol/app/courses/rh124-9.0/pages/ch11s05) (/rol/app/courses/rh124-9.0/pages/ch11s06)
9.0/pages/ch11)
(/rol/app/courses/rh124-9.0/pages/ch11s07) (/rol/app/courses/rh124-9.0/pages/ch11s08) (/rol/app/courses/rh124-9.0/pages/ch11s09) (/rol/app/courses/rh124-9.0/pages/ch11s10)
12
(/rol/app/courses/rh124-9.0/pages/ch11s11) (/rol/app/courses/rh124-9.0/pages/ch11s12) (/rol/app/courses/rh124-9.0/pages/ch12) (/rol/app/courses/rh124-9.0/pages/ch12s02)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch12s03) (/rol/app/courses/rh124-9.0/pages/ch12s04) (/rol/app/courses/rh124-9.0/pages/ch12s05) (/rol/app/courses/rh124-9.0/pages/ch12s06)
9.0/pages/ch12) 13
(/rol/app/courses/rh124-9.0/pages/ch12s07) (/rol/app/courses/rh124-9.0/pages/ch12s08) (/rol/app/courses/rh124-9.0/pages/ch12s09) (/rol/app/courses/rh124-9.0/pages/ch12s10)
(/rol/ap
(/rol/app/courses/rh124-9.0/pages/ch13) (/rol/app/courses/rh124-9.0/pages/ch13s02) (/rol/app/courses/rh124-9.0/pages/ch13s03) (/rol/app/courses/rh124-9.0/pages/ch13s04)
9.0/pa
14
(/rol/app/courses/rh124-9.0/pages/ch13s05) (/rol/app/courses/rh124-9.0/pages/ch13s06) (/rol/app/courses/rh124-9.0/pages/ch13s07) (/rol/app/courses/rh124-9.0/pages/ch13s08)
(/rol/ap
(/rol/app/courses/rh124-9.0/pages/ch14) (/rol/app/courses/rh124-9.0/pages/ch14s02) (/rol/app/courses/rh124-9.0/pages/ch14s03) (/rol/app/courses/rh124-9.0/pages/ch14s04)
15 9.0/pa
(/rol/app/courses/rh124-9.0/pages/ch14s05) (/rol/app/courses/rh124-9.0/pages/ch14s06) (/rol/app/courses/rh124-9.0/pages/ch14s07) (/rol/app/courses/rh124-9.0/pages/ch15)
(/rol/app/courses/rh124-
(/rol/app/courses/rh124-9.0/pages/ch15s02) (/rol/app/courses/rh124-9.0/pages/ch15s03) (/rol/app/courses/rh124-9.0/pages/ch15s04) (/rol/app/courses/rh124-9.0/pages/ch15s05)
9.0/pages/ch15)
(/rol/app/courses/rh124-9.0/pages/ch15s06)

(/rol/app/courses/rh124-9.0/pages/ch03s10)
Previous (/rol/app/cour
Next

Lab: Manage Files from the Command Line


In this lab, you efficiently create, move, and remove files and directories by using the shell and various file name matching techniques.

Outcomes

Use wildcards to locate and manipulate files.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command prepares your environment and ensures that all required resources are available.

[student@workstation ~]$ lab start files-review

Instructions

1. Use the ssh command to log in to the serverb machine as the student user. The system's configuration supports the use of SSH keys for authentication.

[student@workstation ~]$ ssh student@serverb


...output omitted...

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 2/11
9/12/24, 4:48 PM RH124 - ch03s11

Hide Solution

2. Create a directory called project_plans in the Documents directory. The Documents directory is placed in the student user's home directory. Create two empty files
in the project_plans directory called season1_project_plan.odf and season2_project_plan.odf.

Hint: If the ~/Documents directory does not exist, then use the mkdir command -p option to create it.

[student@serverb ~]$ mkdir -p ~/Documents/project_plans


[student@serverb ~]$ touch \
~/Documents/project_plans/{season1,season2}_project_plan.odf
[student@serverb ~]$ ls -lR Documents/
Documents/:
total 0
drwxr-xr-x. 2 student student 70 Mar 7 03:50 project_plans

Documents/project_plans:
total 0
-rw-r--r--. 1 student student 0 Mar 7 03:50 season1_project_plan.odf
-rw-r--r--. 1 student student 0 Mar 7 03:50 season2_project_plan.odf

Hide Solution

3. Create sets of empty practice files to use in this lab. If you do not immediately recognize the intended shell expansion shortcut, then use the solution to learn
and practice. Use shell tab completion to locate file path names. Create 12 files with tv_seasonX_episodeY.ogg names in the /home/student directory. Replace X
with the season number and Y with that season's episode, for two seasons of six episodes each.

[student@serverb ~]$ touch tv_season{1..2}_episode{1..6}.ogg


[student@serverb ~]$ ls tv*
tv_season1_episode1.ogg tv_season1_episode5.ogg tv_season2_episode3.ogg
tv_season1_episode2.ogg tv_season1_episode6.ogg tv_season2_episode4.ogg
tv_season1_episode3.ogg tv_season2_episode1.ogg tv_season2_episode5.ogg
tv_season1_episode4.ogg tv_season2_episode2.ogg tv_season2_episode6.ogg

Hide Solution

4. As the author of a successful series of mystery novels, you are editing your next bestseller's chapters for publishing. Create eight files with mystery_chapterX.odf
names. Replace X with the numbers 1 through 8.

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 3/11
9/12/24, 4:48 PM RH124 - ch03s11

[student@serverb ~]$ touch mystery_chapter{1..8}.odf


[student@serverb ~]$ ls mys*
mystery_chapter1.odf mystery_chapter4.odf mystery_chapter7.odf
mystery_chapter2.odf mystery_chapter5.odf mystery_chapter8.odf
mystery_chapter3.odf mystery_chapter6.odf

Hide Solution

5. Use a single command to create two subdirectories called season1 and season2 under the Videos directory to organize the TV episodes. Move the appropriate TV
episodes into the season subdirectories. Use only two commands, and specify destinations with relative syntax.

5.1. Create two subdirectories called season1 and season2 under the Videos directory by using a single command.

[student@serverb ~]$ mkdir -p Videos/season{1..2}


[student@serverb ~]$ ls Videos
season1 season2

5.2. Move the appropriate TV episodes into the season subdirectories by using only two commands.

[student@serverb ~]$ mv tv_season1* Videos/season1


[student@serverb ~]$ mv tv_season2* Videos/season2
[student@serverb ~]$ ls -R Videos
Videos:
season1 season2

Videos/season1:
tv_season1_episode1.ogg tv_season1_episode3.ogg tv_season1_episode5.ogg
tv_season1_episode2.ogg tv_season1_episode4.ogg tv_season1_episode6.ogg

Videos/season2:
tv_season2_episode1.ogg tv_season2_episode3.ogg tv_season2_episode5.ogg
tv_season2_episode2.ogg tv_season2_episode4.ogg tv_season2_episode6.ogg

Hide Solution

6. Create a two-level directory hierarchy with a single command to organize the mystery book chapters. Create the my_bestseller subdirectory under the
Documents directory, and create the chapters subdirectory under the new my_bestseller directory. Create three more subdirectories directly under the
my_bestseller directory with a single command. Name these subdirectories editor, changes, and vacation. You do not need to use the mkdir -p command to
create parents because the my_bestseller parent directory exists.

6.1. Create the my_bestseller directory under the Documents directory. Create the chapters directory under the my_bestseller directory.

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 4/11
9/12/24, 4:48 PM RH124 - ch03s11

[student@serverb ~]$ mkdir -p Documents/my_bestseller/chapters


[student@serverb ~]$ ls -R Documents
Documents:
my_bestseller project_plans

Documents/my_bestseller:
chapters

Documents/my_bestseller/chapters:

Documents/project_plans:
season1_project_plan.odf season2_project_plan.odf

6.2. Create three directories called editor, changes, and vacation, under the my_bestseller directory by using a single command.

[student@serverb ~]$ mkdir Documents/my_bestseller/{editor,changes,vacation}


[student@serverb ~]$ ls -R Documents
Documents:
my_bestseller project_plans

Documents/my_bestseller:
changes chapters editor vacation

Documents/my_bestseller/changes:

Documents/my_bestseller/chapters:

Documents/my_bestseller/editor:

Documents/my_bestseller/vacation:

Documents/project_plans:
season1_project_plan.odf season2_project_plan.odf

Hide Solution

7. Change to the chapters directory. Use the tilde (~) home directory shortcut to move all book chapters to the chapters directory, which is now your current
directory. Use the simplest syntax to specify the destination directory.
You want to send the first two chapters to the editor for review. Move only those two chapters to the editor directory to avoid modifying them during the
review. Starting from the chapters subdirectory, use brace expansion with a range to specify the chapter file names to move and a relative path for the
destination directory.

While on vacation, you intend to write chapters 7 and 8. Use a single command to move the files from the chapters directory to the vacation directory. Specify
the chapter file names by using brace expansion with a list of strings and without using wildcard characters.

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 5/11
9/12/24, 4:48 PM RH124 - ch03s11

7.1. Change to the chapters directory and use the tilde (~) home directory shortcut to move all book chapters to the chapters directory.

[student@serverb ~]$ cd Documents/my_bestseller/chapters


[student@serverb chapters]$ mv ~/mystery_chapter* .
[student@serverb chapters]$ ls
mystery_chapter1.odf mystery_chapter4.odf mystery_chapter7.odf
mystery_chapter2.odf mystery_chapter5.odf mystery_chapter8.odf
mystery_chapter3.odf mystery_chapter6.odf

7.2. Move the first two chapters to the editor directory. Use brace expansion with a range to specify the chapter file names to move and a relative path for
the destination directory.

[student@serverb chapters]$ mv mystery_chapter{1..2}.odf ../editor


[student@serverb chapters]$ ls
mystery_chapter3.odf mystery_chapter5.odf mystery_chapter7.odf
mystery_chapter4.odf mystery_chapter6.odf mystery_chapter8.odf
[student@serverb chapters]$ ls ../editor
mystery_chapter1.odf mystery_chapter2.odf

7.3. Use a single command to move the chapters 7 and 8 from the chapters directory to the vacation directory. Specify the chapter file names by using
brace expansion with a list of strings and without using wildcard characters.

[student@serverb chapters]$ mv mystery_chapter{7,8}.odf ../vacation


[student@serverb chapters]$ ls
mystery_chapter3.odf mystery_chapter5.odf
mystery_chapter4.odf mystery_chapter6.odf
[student@serverb chapters]$ ls ../vacation
mystery_chapter7.odf mystery_chapter8.odf

Hide Solution

8. Change your working directory to ~/Videos/season2, and then copy the first episode of the season to the vacation directory. Use a single cd command to change
from your working directory to the ~/Documents/my_bestseller/vacation directory. List its files. Use the previous working directory argument to return to the
season2 directory. (This argument succeeds if the last directory change with the cd command used only one command rather than several cd commands.) From
the season2 directory, copy the episode 2 file into the vacation directory. Use the shortcut again to return to the vacation directory.

8.1. Change your working directory to ~/Videos/season2, and then copy the first episode of the season to the vacation directory.

[student@serverb chapters]$ cd ~/Videos/season2


[student@serverb season2]$ cp *episode1.ogg ~/Documents/my_bestseller/vacation

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 6/11
9/12/24, 4:48 PM RH124 - ch03s11
8.2. Use a single cd command to change from your working directory to the ~/Documents/my_bestseller/vacation directory, list its files, and use the -
argument to return to the previous directory. Copy the episode 2 file into the vacation directory. Use the cd command with the - argument to return to
the vacation directory.

[student@serverb season2]$ cd ~/Documents/my_bestseller/vacation


[student@serverb vacation]$ ls
mystery_chapter7.odf mystery_chapter8.odf tv_season2_episode1.ogg
[student@serverb vacation]$ cd -
/home/student/Videos/season2
[student@serverb season2]$ cp *episode2.ogg ~/Documents/my_bestseller/vacation
[student@serverb season2]$ cd -
/home/student/Documents/my_bestseller/vacation
[student@serverb vacation]$ ls
mystery_chapter7.odf tv_season2_episode1.ogg
mystery_chapter8.odf tv_season2_episode2.ogg

Hide Solution

9. The authors of chapters 5 and 6 want to experiment with possible changes. Copy both files from the ~/Documents/my_bestseller/chapters directory to the
~/Documents/my_bestseller/changes directory to prevent these changes from modifying original files. Navigate to the ~/Documents/my_bestseller directory. Use
square-bracket pattern matching to specify which chapter numbers to match in the filename argument of the cp command.

[student@serverb vacation]$ cd ~/Documents/my_bestseller


[student@serverb my_bestseller]$ cp chapters/mystery_chapter[56].odf changes
[student@serverb my_bestseller]$ ls chapters
mystery_chapter3.odf mystery_chapter5.odf
mystery_chapter4.odf mystery_chapter6.odf
[student@serverb my_bestseller]$ ls changes
mystery_chapter5.odf mystery_chapter6.odf

Hide Solution

10. Change your current directory to the changes directory and use the date +%F command with command substitution to copy the mystery_chapter5.odf file to a
new file that includes the full date. Use the mystery_chapter5_YYYY-MM-DD.odf name format.

By using command substitution with the date +%s command, make another copy of mystery_chapter5.odf, and append the current time stamp (as the number
of seconds since the epoch, 1970-01-01 00:00 UTC) to ensure a unique file name.

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 7/11
9/12/24, 4:48 PM RH124 - ch03s11

[student@serverb my_bestseller]$ cd changes


[student@serverb changes]$ cp mystery_chapter5.odf \
mystery_chapter5_$(date +%F).odf
[student@serverb changes]$ cp mystery_chapter5.odf \
mystery_chapter5_$(date +%s).odf
[student@serverb changes]$ ls
mystery_chapter5_1646644424.odf mystery_chapter5.odf
mystery_chapter5_2022-03-07.odf mystery_chapter6.odf

Hide Solution

11. After further review, you decide that you do not need the plot changes. Delete the changes directory.

If it is necessary, then navigate to the changes directory and delete all the files within the directory. You cannot delete a directory when it is the current working
directory.

Change to the parent directory of the changes directory. Try to delete the empty directory by using the rm command without the -r recursive option. This
attempt should fail. Finally, use the rmdir command to delete the empty directory, which succeeds.

When the vacation is over, you no longer need the vacation directory. Delete it by using the rm command with the recursive option.

When finished, return to the student user's home directory.

11.1. Delete the changes directory. Change to the parent directory of the changes directory, and try to delete the empty directory by using the rm command
without the -r recursive option, which should fail. Use the rmdir command to delete the empty directory.

[student@serverb changes]$ rm mystery*


[student@serverb changes]$ cd ..
[student@serverb my_bestseller]$ rm changes
rm: cannot remove 'changes': Is a directory
[student@serverb my_bestseller]$ rmdir changes
[student@serverb my_bestseller]$ ls
chapters editor vacation

11.2. Delete the vacation directory by using the rm command with the -r option. Return to the student user's home directory.

[student@serverb my_bestseller]$ rm -r vacation


[student@serverb my_bestseller]$ ls
chapters editor
[student@serverb my_bestseller]$ cd
[student@serverb ~]$

Hide Solution

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 8/11
9/12/24, 4:48 PM RH124 - ch03s11
12. Create a hard link to the ~/Documents/project_plans/season2_project_plan.odf file called ~/Documents/backups/season2_project_plan.odf.back. A hard link
protects against accidental deletion of the original file and keeps the backup file updated as you change the original file.
Hint: If the ~/Documents/backups directory does not exist, then use the mkdir command to create it.

12.1. Create a hard link to the ~/Documents/project_plans/season2_project_plan.odf file called ~/Documents/backups/season2_project_plan.odf.back.

[student@serverb ~]$ mkdir ~/Documents/backups


[student@serverb ~]$ ln ~/Documents/project_plans/season2_project_plan.odf \
~/Documents/backups/season2_project_plan.odf.back
[student@serverb ~]$ ls -lR ~/Documents/
/home/student/Documents/:
total 0
drwxr-xr-x. 2 student student 43 Mar 7 04:18 backups
drwxr-xr-x. 4 student student 36 Mar 7 04:16 my_bestseller
drwxr-xr-x. 2 student student 70 Mar 7 03:50 project_plans

/home/student/Documents/backups:
total 0
-rw-r--r--. 2 student student 0 Mar 7 03:50 season2_project_plan.odf.back

/home/student/Documents/my_bestseller:
total 0
drwxr-xr-x. 2 student student 118 Mar 7 04:07 chapters
drwxr-xr-x. 2 student student 62 Mar 7 04:06 editor

/home/student/Documents/my_bestseller/chapters:
total 0
-rw-r--r--. 1 student student 0 Mar 7 03:56 mystery_chapter3.odf
-rw-r--r--. 1 student student 0 Mar 7 03:56 mystery_chapter4.odf
-rw-r--r--. 1 student student 0 Mar 7 03:56 mystery_chapter5.odf
-rw-r--r--. 1 student student 0 Mar 7 03:56 mystery_chapter6.odf

/home/student/Documents/my_bestseller/editor:
total 0
-rw-r--r--. 1 student student 0 Mar 7 03:56 mystery_chapter1.odf
-rw-r--r--. 1 student student 0 Mar 7 03:56 mystery_chapter2.odf

/home/student/Documents/project_plans:
total 0
-rw-r--r--. 1 student student 0 Mar 7 03:50 season1_project_plan.odf
-rw-r--r--. 2 student student 0 Mar 7 03:50 season2_project_plan.odf

Notice that the link count is 2 for both season2_project_plan.odf.back and season2_project_plan.odf files.

12.2. Return to the workstation system as the student user.

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 9/11
9/12/24, 4:48 PM RH124 - ch03s11

[student@serverb ~]$ exit


logout
Connection to serverb closed.
[student@workstation ~]$

Hide Solution

Evaluation

As the student user on the workstation machine, use the lab command to grade your work. Correct any reported failures and rerun the command until successful.

[student@workstation ~]$ lab grade files-review

Finish

On the workstation machine, change to the student user home directory and use the lab command to complete this exercise. This step is important to ensure that
resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish files-review

This concludes the section.

(/rol/app/courses/rh124-9.0/pages/ch03s10)
Previous (/rol/app/cour
Next

Discuss Red Hat System Administration I (https://learn.redhat.com/t5/RH124-Red-Hat-System/gh-


p/RH124RedHatSystemAdministrationI)

RH124 Chapter 15 Lab 3: Install zsh Package Red Hat System Administration I | Guided Red Hat System Administration I (RH124)
VictoriaB97 16 Jan 2024 Exercise: Explain and Investigate RPM Softwar… Haley_Ruccio 19 Jul 2023
AbeHiero 10 Nov 2023
Hello,I am trying to finish up Lab 3 of the Chapter 15 The first of two courses covering the core system
I cannot start the lab with command: lab start software-
Comprehensive Review Labs in RH124, and when I type… administration tasks needed to manage Red Hat…
rpm. I get this error:ModuleNotFoundError: No module…
1 2 378 1 2 1183 3 1 336

Revision: rh124-9.0-bb67ff8

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 10/11
9/12/24, 4:48 PM RH124 - ch03s11

Privacy Policy (http://s.bl-1.com/h/cZrgWbQn?url=https://www.redhat.com/en/about/privacy-policy? Red Hat Training Policies (http://s.bl-1.com/h/cZrb2DXG?url=https://www.redhat.com/en/about/red-hat-


extIdCarryOver=true&sc_cid=701f2000001D8QoAAK) training-policies)

Terms of Use (https://www.redhat.com/en/about/terms-use) All policies and guidelines (https://www.redhat.com/en/about/all-policies-guidelines)

Release Notes (https://learn.redhat.com/t5/Red-Hat-Learning-Subscription/bg- Cookie preferences


p/RedHatLearningSubscriptionGroupblog-board)

https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch03s11 11/11

You might also like