If the working directory is /home/max with a subdirectory named literature, give three sets of commands you can use to create a subdirectory named classics under literature. Also give several sets of commands you can use to remove the classics directory and its contents.

What will be an ideal response?

The first command line uses a relative pathname whereas the second and

third use absolute pathname to create the classics directory under the liter-
ature directory. Both commands are executed from Max’s home directory

(although it does not matter where you execute the second command from):
$ mkdir literature/classics
$ mkdir /home/max/literature/classics$ mkdir
~/max/literature/classics
Next a cd command changes the working directory to literature. From
literature, a simple pathname or an absolute pathname can create the
classics directory:
$ cd literature
$ mkdir classics
$ mkdir /home/max/literature/classics
Before you remove a file, use pwd to check that the working directory is
what you think it is and, if you plan to use an ambiguous file reference, use
that file reference to list the files you will delete. This procedure helps ensure
you do not delete files by mistake. Next rm removes ordinary files, and rmdir
removes the empty (except for the two standard directory entries . and ..)
directory file:
$ pwd
/home/max
$ ls literature/classics/*
...
$ rm literature/classics/*
$ rmdir literature/classics
You can also perform this task either of these ways:
$ cd literature
$ ls classics
...
$ rm classics/*
$ rmdir classics
$ cd classics
$ ls
...
$ rm *
$ cd ..
$ rmdir classics

Computer Science & Information Technology

You might also like to view...

In a table, if a number used in the calculation is changed, you must use the ________ command to recalculate the value

A) Update Formula B) Update Field C) Edit Formula D) Edit Field

Computer Science & Information Technology

In digital video, a lower resolution reduces the bit rate.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology