Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: In this lab, you will navigate the Linux file system. You will learn how to use the navigation tools provided by Linux to locate

Objective:

In this lab, you will navigate the Linux file system. You will learn how to use the navigation tools provided by Linux to locate files and folders. This lab covers the following commands:

pwd

ls

cd

mkdir

touch

cat

cp

mv

rm

Before you start the lab exercise, it is important to understand the Linux file system organization. Like the legacy operating system, the files on a Linux system are arranged in what is called a hierarchical directory structure. This means that they are organized in a tree-like pattern of directories (called folders in other systems), which may contain files and other directories. The first directory in the file system is called the root directory. The root directory contains files and subdirectories, which contain more files and subdirectories and so on and so on.

The bin folder contains commands that can be run by any user such as the cd command, ls, mkdir etc

The boot folder contains everything required by the boot process.

The dev folder contains details about all the devices on the system.

The etc folder is generally, where all the system configuration files are stored.

The home folder is generally where all the user folders are stored and for the average user is the only area they should be concerned about

The lib and lib64 folders contain all the kernel and shared libraries.

The media folder is where mounted media such as USB drives are located.

The opt folder is used by some software packages as a place to store the binaries.

The proc folder is a system folder used by the kernel.

The sys folder contains a folder structure to provide system information.

The tmp folder is a temporary folder.

Steps

Make a directory called lab02 in the student directory you just entered.

Copy the file/etc/hosts to the lab02 directory you just created.

Change the current directory to lab02.

Change the name of the file hosts to oldhosts.

Create an empty file with name file1 using the command touch. Write down the file size and created date and time below using ls command.

$ touch file1

Write contents to the empty file you created earlier with the following command

$ echo Welcome to Operating System ECCE4254 Lab2 > file1

Write down the commands to display the contents of the file1.

Copy the contents of a file1 to file2.

Rename a file2 as file 3.

What difference you note in the above cp and mv command ?

List the content of the directory lab02.

Remove all files in directory lab02.

Remove the directory lab02.

Create a file with name foobar in your student directory and add the contents using following commands.

$touch foobar

$ echo file permission practice exercise > foobar

How can you set the permission string to user read/write, group read, others read using chmod in long format of file foobar?

How can you revoke group write permissions on a file foobar without changing any other permissions

(c) How can you grant user and group execute permissions without changing any other permissions of file foobar?

What do the following numeric file modes represent:

666

770

640

444

What command-line argument to chmod allows you to alter the permissions of an entire directory tree?

What does execute (x) permission mean on directories?

A user wants to set the permissions of a directory tree rooted in home so that the user and group can list, read and write (but not execute) files, but nobody else has any access. Which of the following commands is most appropriate? Why?

(a) chmod R 660 home

(b) chmod R 770 home

(c) chmod R u+rw,g+rw,o-rwx home

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

Students also viewed these Databases questions

Question

LO6 Describe how individual pay rates are set.

Answered: 1 week ago