The company has decided to move to the cloud and you've been tasked to create the home directories for everyone. You are given a shell account for the server. You need to create the file structure for everyone using the shell.
- Using a unix shell
- How to interact with file contents
- How to create files and directories
- How to set permissions
- How to do loops in the shell
-
Create a directory for yourself inside the
home
directory. Use the shell to navigate the directory structure. Use themkdir
command to create a directory.- There is a directory called
home/<your name>
- There is a directory called
-
Create a few directories that will be added to everyone's home folder.
- There is a directory named
home/<your name>/src
- There is a directory named
home/<your name>/config
- There is a directory named
-
Create the files that will be present in everyone's folder structure.
- Create a file called
home/<your name/config/profile
. - The profile file should set up some variables with the contents:
- Create a file called
export NAME='<your name>'
export PS1='<your name> \w $ '
- Create a file called `home/<your name>/src/README.md`
- The source readme file at `home/<your name>/src/README.md` should read:
# Source folder
This is the folder where you can keep your projects.
-
Now you need to create the home folder for everyone else. You will find the name of your co-workers in the
names.lst
file.- Create the same directory structure for everyone like the one that you created for yourself.
- Make sure that wherever you used your own name, use your given co-worker's name instead.
None
- You can use a combination of
while
andread
to read your input into variables line-by-line and do something with it. - You can assamble files in multiple steps with appending.
Click here to clone your own Git repository:
- ❗ How to get help for commands
- ❗ Interacting with the system from the shell
- ❗ Control structures in the shell
You will need this only at review time, after completing the project. Use this form to record the review you provide for your peer.