I chose to setup an Ubuntu 20.04.4 LTS virtual machine, the ISO file for this machine was downloaded from the official Ubuntu website. I used Oracle VirtualBox to create the virtual machine so the setup was fairly simple.
Use any OS (in my case this is Ubuntu 20.04.4 LTS) setup in Question 1.
Assume you are started at your home directory.
Perform a command that displays the absolute path of your home directory.
1. Create a new directory inside your home directory and name it “Jack”.
2. Now navigate to the “Jack” directory and create directory “Jack-COMP501WORK” and change your current working directory to “Jack-COMP501WORK”.
3. Create three new subdirectories called “Sec1”, “Sec2”, and “Sec3” in “Jack-COMP501WORK”.
4. Create a new file called “MyFave.txt”.
a. The first line should contain your name and ID number.
b. The second line should be the first sentence of your favourite song.
c. The third line should be the name of your favourite movie.
Display the contents of the file "MyFave.txt” to the standard output screen.
5. Display the number of words in the file “MyFave.txt”.
6. Copy the file “MyFave.txt” to directory “Sec1” and rename it to “MyFaveCopy.txt”.
Make another copy of “MyFaveCopy.txt” just made in directory “Sec1” and name it “MyFaveCopyCopy.txt”.
Then, display the contents of the directory “Sec1” using ls.
7. Copy all the contents of directory “Sec1” to directory “Sec2” and display the contents of the directory “Sec2”.
Display a listing of all the files and directories in long format in the current working directory.
8. Assume that you are now at the current working directory “Jack-COMP501WORK”; create 15 new files.
9. Display a listing of all the files in the current working directory ending with the letter ‘t’ using one command.
10. Display a listing of all the files in the current working directory ending with the letter ‘T’ using one command.
11. Move everything (files/directories) containing the letter ‘t’ to the directory “Sec3” using one command.
12. Display a listing of the contents of the current directory “Jack-COMP501WORK”. All files that contain the letter ‘t’ should now be gone.