1 Create a directory structure IFT383FinalExamActivitiesActi

1. Create a directory structure IFT383FinalExam/Activities/Activity1 in your home directory

2. Create a file using the cat command named classRoster

3. Add three records to your file with the following fields, separated by a comma Student ID First Name Last Name Grade Program of Study ASURITE ID (username)

4. Display the contents of the file classRoster Move the file classRoster to the directory Activity1

5. Go to the Activity1 directory Display the directory you are in

6. Add read, write and execute permissions for user and group to Activity1.dir

7. Create a new file called header using cat command whose contents are the field names, separated by a tab space Student ID First Name Last Name Grade Program of Study ASURITE ID (username)

8. Display the header file Copy the contents of header into classRoster, as the first line Replace the comma with a tab space using appropriate filters (such as cut, paste, tr, head, etc.)

9. Save this file as finalRoster.txt Display the contents of the file finalRoster.txt Convert the finalRoster to a UNIX file and save as rosterUNIX,

10. perform a byte-by-byte comparison of the two files, and display the differences.

Solution

1) cd ~

mkdir -p IFT383FinalExam/Activities/Activity1


2) cat > classRoster


3) 1,bill,gates,cse,bgates
2,larry,page,cse,lpage
3,elon,musk,ece,emusk


4) cat classRoster
1,bill,gates,cse,bgates
2,larry,page,cse,lpage
3,elon,musk,ece,emusk

mv classRoster IFT383FinalExam/Activities/Activity1/


5) cd IFT383FinalExam/Activities/Activity1

pwd
/home/vkona/IFT383FinalExam/Activities/Activity1


6) chmod -R 771 ../Activity1

ls -l ../Activity1/
total 4
-rwxrwx--x 1 vkona vkona 69 Mar 1 16:35 classRoster


7) cat >header
1   bill   gates   cse   bgates
2   larry   page   cse   lpage  
3   elon   musk   ece   emusk

cat header
1   bill   gates   cse   bgates
2   larry   page   cse   lpage  
3   elon   musk   ece   emusk


8) cat header >> classRostercat header >> classRoster

cat classRoster

1,bill,gates,cse,bgates
2,larry,page,cse,lpage
3,elon,musk,ece,emusk
1   bill   gates   cse   bgates
2   larry   page   cse   lpage  
3   elon   musk   ece   emusk

1. Create a directory structure IFT383FinalExam/Activities/Activity1 in your home directory 2. Create a file using the cat command named classRoster 3. Add thre
1. Create a directory structure IFT383FinalExam/Activities/Activity1 in your home directory 2. Create a file using the cat command named classRoster 3. Add thre

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site