Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Overview: In this milestone, you will demonstrate your ability to navigate the L

ID: 3740826 • Letter: O

Question

Overview: In this milestone, you will demonstrate your ability to navigate the Linux directory structure and run common tasks. Complete this milestone in one session to confirm that the history log file that you will create contains all of the commands used. If you log out before you complete this milestone, your command history will be reset. Review the Final Project Guidelines and Rubric document to see how this milestone will prepare you for that assignment.

You will complete this project in the Codio unit titled “Milestone 1: Tasks and Navigation.” When you complete this milestone, you will download a copy of your script and upload it to Brightspace. Refer to the Codio instruction set for information on how to download your history log file.

Prompt: Specifically, the following critical elements must be addressed:

Navigate: The first step that you will provide evidence for in your log file is to view the following using Linux commands:

Current directory

Current user

File Permissions: Locate the “whoownsme.txt” file and confirm that all users have the ability to execute the file.

Create Files: Demonstrate your ability to utilize various Linux commands to create text files in unique ways. Create these files in the workspace directory. Ensure the commands in your log file show that your text files were created with two different methods. Create the followingfiles:

A text file using the vi editor that includes a paragraph of text explaining what you believe is the most complicated part of the final project

A text file showing the current month, day, and time (Title this fileTime_File.txt.)

In the workspace directory, create a new directory titled Milestone_FILES.

Modify and Move: Utilize Linux commands to rename files and copy them to the Milestone_Files directory. Add “_MOVED” to the end of the file name.

Remember that your modified files should use an appropriate naming convention such as “XXXX_XXXX_MOVED.txt.”

Create a log file of all the commands you have utilized to this point. Title this file Log_File.txt and download it for submission.

Explanation / Answer

NOTE: I have completed your assignment. Please check and let me know if you find any issues. I will revert back within 24 hours. thanks for your patience.

Unix Terminal> cat logfile
Script started on Sun Apr 1 07:38:06 2018
bash-3.2$ pwd
/Users/vishal/Chegg/shell
bash-3.2$ echo $USER
vishal
bash-3.2$ ls -l whoownsme.txt
-rwxr-xr-x 1 vishal group 0 Apr 1 07:36 whoownsme.txt
bash-3.2$ find / -name 'whoownsme.txt' -ls
find: /.DocumentRevisions-V100: Permission denied
find: /.fseventsd: Permission denied
find: /.Spotlight-V100: Permission denied
find: /.Trashes: Permission denied
^C
bash-3.2$ find / -name 'whoownsme.txt' -ls 2 > /dev/null
find: 2: unknown primary or operator
bash-3.2$ find / -name 'whoownsme.txt' -ls 2> /dev/null

^C
bash-3.2$ find . -name 'whoownsme.txt' -ls 2> /dev/null
17374351 0 -rwxr-xr-x 1 vishal group 0 Apr 1 07:36 ./whoownsme.txt
bash-3.2$ cat > testfile1
hello world
bash-3.2$ cat testfile1
hello world
bash-3.2$ vi testfile2
bash-3.2$ date
Sun Apr 1 07:41:21 IST 2018
bash-3.2$ ls -l testfile2
-rw-r--r-- 1 vishal group 67 Apr 1 07:40 testfile2
bash-3.2$ mv testfile2 0740_File.txt
bash-3.2$ ls -l 0740_File.txt
-rw-r--r-- 1 vishal group 67 Apr 1 07:40 0740_File.txt
bash-3.2$ mkdir Milestone_FILES
bash-3.2$ mv 0740_File.txt 0740_File_Moved.txt
bash-3.2$ ls -l 0740_File_Moved.txt
-rw-r--r-- 1 vishal group 67 Apr 1 07:40 0740_File_Moved.txt
bash-3.2$ cp 0740_File_Moved.txt Milestone_FILES/
bash-3.2$ ls -l Milestone_FILES/
total 8
-rw-r--r-- 1 vishal group 67 Apr 1 07:43 0740_File_Moved.txt
bash-3.2$ exit
exit

Script done on Sun Apr 1 07:43:23 2018
Unix Terminal>

Explanation:
1) In order for unix to record all the commands you have typed. You should use
script -a logfile
command which stores the commands typed into the file in this case logfile.
2) Once you think all the required commands are recorded, you can type "exit" command which completes termination of commands recording.
3) Let me walk you through each of the commands used.
4) pwd - to print the present working directory
5) echo $USER - to print the current user
6) To find whoownsme.txt file you can either use ls or find command to identify that.
7) If you want to create a file there are various ways to do that.
a) you can use cat > filename to create a file where you can type something and exit once the contents are written by typing "ctrl + d" command.
b) We can use "vi filename " command to create a file and write some contents. then exit using ":wq" command after moving to esc mode.
8) To rename or move files we can use mv command and to copy files we can use cp command
9) To create a directory we have used mkdir command.
10) I have shown the contents of logfile which i have recorded to store all the commands i have typed. You need to do similar exercise as per the question and share the same for your assignment.