Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
146 views2 pages

SLE201v15 Lab Exercise 3.4

This document provides instructions for navigating the file system and listing directory contents using common Linux commands like cd, pwd, and ls. It has the user change directories to locations like /tmp, their home directory, and /usr/share/doc. They then use ls with various options to view the contents of the current directory, including hidden files, file permissions, sizes and classification indicators for different file types.

Uploaded by

omar walid
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)
146 views2 pages

SLE201v15 Lab Exercise 3.4

This document provides instructions for navigating the file system and listing directory contents using common Linux commands like cd, pwd, and ls. It has the user change directories to locations like /tmp, their home directory, and /usr/share/doc. They then use ls with various options to view the contents of the current directory, including hidden files, file permissions, sizes and classification indicators for different file types.

Uploaded by

omar walid
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/ 2

SUSE Linux Enterprise Administration

3- 4 Change Directories and List Directory Contents

Description:

y
In this exercise, you learn how to use the cd, pwd, and ls commands, change the

nl
current directory and list the directory contents.

O
e
Task 1: Open a terminal session

te Us
1. On server1, as the user tux, open a terminal by clicking on the Activities menu and
type:
terminal

bu r
tri ne
When the Terminal icon appears, click on it to start a terminal session

is rt
Task 2: Navigate Around the File System
D Pa
1. From the tux user’s home directory, describe what directories the following characters
refer to:
ot d

.
N an

..
2. Change to the /tmp directory by entering:
D al

cd /tmp
rn

3. Display the name of the current directory by entering:


te

pwd
o
In

4. Change to the home directory by entering:


cd ~
SE

5. Display the name of the current directory by entering:


pwd
SU

6. Change to the /usr/share/doc directory by entering:


cd /usr/share/doc
7. Display the name of the current directory by entering:
pwd
8. Change back to tux’s home directory by entering:
cd -

34
SUSE Linux Enterprise Administration
9. Display the name of the current directory by entering:
pwd

Task 3: List Directory Contents


1. Display the content of the current directory by entering:
ls

y
2. Display the content of the current directory, including the hidden files, by entering:

nl
ls -a

O
3. View the permissions and the file sizes of all the files in the current directory by
entering:

e
te Us
ls -la
4. List the contents of the current directory and display the classification indicators for the
various file types with:

bu r
tri ne
ls -lF

Note what file types the various indicators match up with, */=>@|. For example,
is rt
directories will have a / character appended to the end indicating a directory. What
D Pa
does the * character indicate?

Hint: You can find the answers to the above by using the info ls command, and
ot d

searching for the phrase classify.


N an

Summary:
D al

In this exercise, you the file system and displayed the content of the current directory.
rn
te
o

(End of Exercise)
In
SE
SU

35

You might also like