Computer Science

1/19/2020 Tutorial 1

https://linuxzoo.net/page/structure_tut1.html 1/4

Refresh in: 0:30. Time left: 6 mins

Minimize User: Paul John (tbc) rahul11mittal1994@gmail.com Account expires in 10 days

Log off Account Links Machine State: RUN Boot progress: complete

control connect stats useful

Switch On Nice Switch Off Pull Out Power Leave Queue

Linux Centos 7 fresh linux install image use previous image (if available)

next section

prev section

up prev page

next page

Tutorial 1 Welcome to linuxzoo

Essential Linux The Unix File Structure

Tutorial 1

Shell 101

Time to get your hands working on your first Unix commands.

To reset all the check buttons from a previous attempt click here

Question 1: Create demo account To follow along with the examples shown here using the virtual machines is it safer to use an account other than the administration account (root). By pressing the button below a new account is created called “demo”, password is also “demo”. Log in using this account and you cannot do any damage. If you mess the account up and want to start again, just press the button again.

Once created, you can log into this account using telnet or ssh, logging into the hostname linuxzoo.net. Remember the username is demo and the password is demo. And remember, you cannot break anything using this account! The account begins with an empty directory, so dont be shocked that “ls” shows nothing…

MAKE SURE YOU USE THE USER demo. If you do this with “root” or another account, you will be marked wrong. If you start with the wrong user, make sure you delete any files you created wrongly before changing to demo.

Create account Tests: Complete Create an account called demo, password demo PASSED

Question 2: cal

https://linuxzoo.net/vm/expiry.cgi
https://linuxzoo.net/page/structure_dmanaging.html
https://linuxzoo.net/page/structure_mv.html
https://linuxzoo.net/page/structure.html
https://linuxzoo.net/page/structure_mv.html
https://linuxzoo.net/page/structure_dmanaging.html
https://linuxzoo.net/
https://linuxzoo.net/page/intro.html
https://linuxzoo.net/page/structure.html
1/19/2020 Tutorial 1

https://linuxzoo.net/page/structure_tut1.html 2/4

Use the cal command to find out which day the 31th of December 2002 was on. cal takes two parameters, the number of the month (e.g. 1 for January, 8 for August) and the year as a 4 digit number (e.g. 1997).

Enter the name of the day in the box below. For Monday enter “Mo”, Tuesday is “Tu”, Wednesday is “We”, etc.

Enter the day: Tu

Check Tests: Complete What day was the 31th of December 2002 PASSED

Question 3: cal year cal can also work with 1 parameter, which is the year. When given a year, it displays a calander for the whole year. Use this feature but redirect the output of cal so that the calander for 2005 is saved to a file called “yearfile” in the home directory of demo.

Check Tests: Complete yearfile exists in the right place PASSED Create the calendar for 2005 in yearfile FAILED

Question 4: ls Use the ls command to see the hidden and normal files you have in the home directory for “demo”. Count all the files and directories shown and enter the number below. Include in the counting “.” and “..”.

Number of files:

Check Tests: Complete Count files PASSED

Question 5: file size Which file in /home/demo (including hidden files) has the smallest size? Enter the size below:

Smallest size:

Check Tests: Complete Smallest size of file FAILED

Question 6: append Use redirection to create a file called “thismonth”, containing only this month’s current calendar. Then use the date command to append the current date to the end of the same file.

Check Tests: Complete thismonth exists in the right place PASSED

22

21

1/19/2020 Tutorial 1

https://linuxzoo.net/page/structure_tut1.html 3/4

The calendar appears to be first PASSED The date appears to be last PASSED The calendar with date appended in thismonth PASSED

Question 7: copying Copy the file yearfile to yearfile2. Copy the file yearfile to yearfile3.

Check Tests: Complete Yearfile copied to yearfile2 PASSED Yearfile copied to yearfile3 PASSED

Question 8: moving Change the name of file yearfile3 to thisyear.

Check Tests: Complete Name changed from yearfile3 to thisyear PASSED File yearfile unharmed PASSED

Question 9: deleting Delete the file yearfile.

Check Tests: Complete Yearfile has been deleted PASSED

Question 10: big concat Concatinate the files “thismonth”, “yearfile2” and “thisyear” together to form a single big file called “bigfile”. Check that your command worked using more.

Check Tests: Complete bigfile is a concat of 3 files in order PASSED

Centos 7 intro:

Paths | BasicShell | Search

Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net SELinux1 SELinux2 fwall DNS diag Apache1 Apache2 log Mail

Caine 10.0: Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Mock Exam |

CPD: Cygwin | Paths | Files and head/tail | Find and regex | Sort | Log Analysis Kali: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7a | 8a | 8b | 9 | 10 | Useful: Quiz | Forums | Privacy Policy | Terms and Conditions Site Links: XMLZoo ActiveSQL ProgZoo SQLZoo

https://linuxzoo.net/page/centos_basic1.html
https://linuxzoo.net/page/centos_basic2.html
https://linuxzoo.net/page/centos_basic3.html
https://linuxzoo.net/page/structure_tut1.html
https://linuxzoo.net/page/structure_tut2.html
https://linuxzoo.net/page/wildcards_tut3.html
https://linuxzoo.net/page/sec_tut4.html
https://linuxzoo.net/page/manipulate_tut5.html
https://linuxzoo.net/page/vi_tut.html
https://linuxzoo.net/page/tut_eunix.html
https://linuxzoo.net/page/tut_eadmin.html
https://linuxzoo.net/page/tut_net.html
https://linuxzoo.net/page/tut_selinux1.html
https://linuxzoo.net/page/tut_selinux2.html
https://linuxzoo.net/page/tut_fire.html
https://linuxzoo.net/page/tut_named.html
https://linuxzoo.net/page/tut_diag.html
https://linuxzoo.net/page/tut_eapache.html
https://linuxzoo.net/page/tut_authapache.html
https://linuxzoo.net/page/tut_log.html
https://linuxzoo.net/page/tut_sendmail.html
https://linuxzoo.net/page/caine_wk1.html
https://linuxzoo.net/page/caine_wk2.html
https://linuxzoo.net/page/caine_wk3.html
https://linuxzoo.net/page/lab_caine10.0/Acquisition.html
https://linuxzoo.net/page/caine_wk4.html
https://linuxzoo.net/page/lab_caine10.0/GREP.html
https://linuxzoo.net/page/caine_wk5.html
https://linuxzoo.net/page/lab_caine10.0/GPT.html
https://linuxzoo.net/page/lab_caine10.0/FAT.html
https://linuxzoo.net/page/lab_caine10.0/NTFS.html
https://linuxzoo.net/page/lab_caine10.0/File_Recovery_metadata.html
https://linuxzoo.net/page/lab_caine10.0/File_Recovery_tools.html
https://linuxzoo.net/page/lab_caine10.0/wbforensics.html
https://linuxzoo.net/page/lab_caine10.0/csn11125-MockExam.html
https://linuxzoo.net/page/cpd1.html
https://linuxzoo.net/page/cpd2.html
https://linuxzoo.net/page/cpd3.html
https://linuxzoo.net/page/cpd4.html
https://linuxzoo.net/page/cpd5.html
https://linuxzoo.net/page/cpd6.html
https://linuxzoo.net/page/kali_wk1a.html
https://linuxzoo.net/page/kali_wk1b.html
https://linuxzoo.net/page/kali_wk1c.html
https://linuxzoo.net/page/kali_wk2a.html
https://linuxzoo.net/page/kali_wk3a.html
https://linuxzoo.net/page/kali_wk4a.html
https://linuxzoo.net/page/kali_wk4b.html
https://linuxzoo.net/page/kali_wk5a.html
https://linuxzoo.net/page/kali_wk6a.html
https://linuxzoo.net/page/kali_wk7a.html
https://linuxzoo.net/page/kali_wk8a.html
https://linuxzoo.net/page/kali_wk8b.html
https://linuxzoo.net/page/kali_wk9.html
https://linuxzoo.net/page/kali_wk10.html
https://linuxzoo.net/mc/quiz.cgi
https://linuxzoo.net/forums/
https://linuxzoo.net/page/privacy.html
https://linuxzoo.net/page/terms.html
http://xmlzoo.net/
http://db.grussell.org/
http://progzoo.net/
http://sqlzoo.net/
1/19/2020 Tutorial 1

https://linuxzoo.net/page/structure_tut1.html 4/4

Linuxzoo created by Gordon Russell. @ Copyright 2004-2018 Edinburgh Napier University

Order now and get 10% discount on all orders above $50 now!!The professional are ready and willing handle your assignment.

ORDER NOW »»