Click "Follow" to Subscribe to my blog

MENU

LAB 4 | FULL GUIDE | BASIC LINUX COMMANDS

  


IMPORTANT NOTE: 

**************************************************


1. PLEASE NOTE THAT THIS IS A GUIDE PREPARED FOR YOU TO LEARN SOMETHING IN LINUX.

2.PLEASE DO NOT COPY THIS PICTURES AND COPY IN YOUR LAB REPORT AS ANSWERS.IF YOU DONT UNDERSTAND ANYTHING YOU CAN DIRECTLY PM ME @ MY WHATSAPP LINK.THANK YOU AND GOOD LUCK.

**************************************************


BEFORE MESSAGING:
MAKE SURE YOU SUBSCRIBE TO MY BLOG BEFORE ANY QUESTIONS.
 YOU HELP ME , I HELP YOU

**************************************************
We will use the dmesg program, which shows information about the running kernel, for this example. If it is not available, or if your computer has been running for a long time, the following may not match up quite right on your system.
**************************************************

PART 1

1. Run the following command: cd /tmp



2. Use dmesg to create a file, so we can search for some information about your system: 

dmesg > dmesgl.txt


3. Let's see if we can determine what network device is being used. Ru n: grep network dmesgl.txt


It will show nothing  but that's okay

4. The output might not be very informative . But what if case is an issue? Try the following command: grep -i network dmesgl.txt



5. The - i tells gr e p to ignore case. You should now see which network driver your system is using. Now try the following command : grep -i cdrom dmesgl.txt


6. grep returns a code based on the results of the search. Run the above command again (remember the up arrow shortcut?) : grep -i cdrom dmesgl.txt



7. Now run the following command: echo$?


8.Assuming the text was found , the return code will be o. Now search for a string that should not be there:
 grep -i jimlewis dmesgl.txt



9. Run the following command: echo$?

**************************************************
PART 2 ( USING ZIP)

Here we will experiment with the zip and unzip  command::

1. Run the following command: cd /tmp



 

2. Let's make a temporary directory: mkdir lbooktemp


3. Run the following command: cd lbooktemp


PART 2: FULL VIDEO TUTORIAL (USING ZIP)
Follow this video :
(Video will be explained in class)


PART 3:FULL VIDEO TUTORIAL (USING TAR)

Refer video below:
(Video will be explained in class)



PART 4

1.Run the following command:
cd /tmp



2.Create a file:
sudo dmesg > file1.txt




3. Now run ls- la and remember the info. We will use this later



4.  Use the stat command to see practically everything you would ever want to know about the file:
stat file1.txt


5. Now suppose you have sent that file to someone that is running a Linux system, and want to ensure it did not get corrupted along the way. Run the following command: sum file1.txt



The first number is the checksum and the second is the number of blocks for that file. If the other person  runs  sum on his  copy of the file and  sees the same info, the files are the same.

6. We have created a lot of files by using the redirection operator. You can also use the touch command:
touch file2.txt



8. Since :fi1e2 . txt did not already exist, touch will create it as an empty file. In fact, let's prove that:
file file2.txt



9.So what happens if we run touch on an existing file? Does it empty it? No, it updates the time and date on it. 
Run the following command:
ls -la file1.txt



10. Now run the following command:
touch fi1e1.txt



11. Run ls - la file1.txt again. You should notice it now shows the current date and time on that file.



12. Suppose you want to just view a text file. Run the following command:
less fi1e1.txt



13.⦁ When using the less command press the Space bar to scroll down. Press Ctrl+Z to exit.

14. Say we want to see just the first few lines in that file:
head fi1e1.txt

15. The head command shows the first 10 lines by default. How about the last 10 lines? Run the following command:
tail file1.txt



**************************************************

THANK YOU FOR READING

**************************************************

THE END OF LAB 4 TUTORIAL GUIDE

**************************************************

If you have any questions/problems/questions/errors kindly pm me at https://wa.link/6sx617

**************************************************

IMPORTANT NOTE : 

1.ANY MESSAGE CONSULTATIONS AFTER THE LAB 4 DEADLINE WILL BE NOT ANSWERED

2.PLEASE MAKE SURE YOU HAVE SUBSCRIBED TO MY BLOGSPOT BEFORE MESSAGING ME.

YOU HELP ME,I HELP YOU 

**************************************************

Comments

  1. “Thank you so much for sharing. I have found it extremely helpful… Private tutor Pinecrest I’m off to modify some books!”

    ReplyDelete
  2. "Thanks a lot for sharing. Private tutor Winter Park Will check back later for more of your articles."

    ReplyDelete

Post a Comment

Popular posts from this blog

PART 1 | HOW TO CREATE A FREE BLOGSPOT

PART 3 | HOW TO ADD SUBMENUS AND MAIN MENU | ADVANCED