can someone do this in unix
1.
Your home directory is the current directory you are working in when you first log in on the system. Up to this point you have worked only in your home directory.
When called by itself, the cd (change directory; Sobell, page 92) command takes you to your home directory which makes your home directory the working directory (the directory you are working in).
The pwd (print working directory; Sobell, page 86) command displays the name of the working directory. Use a cd command to make sure you are working in your home directory.
Use a pwd command to confirm you are working in your home directory.
2.
The mkdir (make directory; Sobell, page 90) utility creates a directory.
Use mkdir to create a directory named two as a subdirectory of your home directory. Use file to make sure two exists and is a directory.
3.
An absolute pathname (Sobell, page 88) starts with a slash (/) and is a path from the root directory to the file identified by the pathname.
The pwd command displays the absolute pathname of the working directory.
When you call cd with an argument of the name of a directory, it makes that directory the current working directory.
Use cd to make two the working directory.
Use pwd command to confirm the name of the current working directory is two.
4.
Use vim to create an empty file named fox in the two directory.
Use ls to list the name of fox. 5.
When you give ls an argument that is the name of a directory, ls displays the contents of that directory.
When you use an absolute pathname, it does not matter which directory is your working directory.
Use the ls command with an argument of the absolute pathname of two (see step 3) to display the contents of the two directory.
6.
Make your home directory the working directory.
A relative pathname (Sobell, page 89) is a pathname that does not start with a slash, it starts from (is relative to) the current working directory.
Use a ls command with an argument of two (a relative pathname) to display the contents of the two directory.
7.
The rmdir utility removes an empty directory.
Show that rmdir cannot remove the two directory while it holds a file. Remove fox from the two directory using a relative pathname. Remove the (empty) two directory.
can someone do this in unix 1. Your home directory is the current directory you are working in when you first log in on
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am