Computer Science

1/19/2020 Tutorial 1 1/4

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

Minimize User: Paul John (tbc) 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 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
1/19/2020 Tutorial 1 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



1/19/2020 Tutorial 1 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
1/19/2020 Tutorial 1 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.