Linux Commands

https://linuxzoo.net/page/structure_tut2.html 1/3

Refresh in: 0:27. Time left: Holding

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)

prev section up prev page next page

Tutorial 2 Welcome to linuxzoo

Essential Linux The Unix File Structure

Tutorial 2

Directories

Creating and using directories.

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

Question 1: Update demo account If you have just completed all the previous tutorials you need not use this setup button. However, if you have skipped part or all of the previous tutorial questions, or when you ran your virtual machine the demo account was missing, then the button below will create the demo account and create the files which the previous tutorials would have had you create.

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!

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

Question 2: Create a directory structure In the demo account /home/demo create the directory structure shown:

 

 

1/19/2020 Tutorial 2

https://linuxzoo.net/page/structure_tut2.html 2/3

demo | —————–+————– | | | work letters scripts | ——–+——— | | | progs tutorial misc

The top directory of the structure (demo) corresponds to /home/demo, your HOME directory and therefore the directory you start in when you log into your machine using the demo username. You DO NOT create a “demo” directory yourself to answer this question, as it already exists are you are already it in.

Create directories Tests: Complete Create directories PASSED

Question 3: cp Copy the files /etc/group and /etc/vimrc into your misc directory.

Check Tests: Complete copy files FAILED

Question 4: Relative move Make misc your current directory. Move the file vimrc to the progs directory. Use ls to verify that this worked.

Check Tests: Complete vimrc has moved PASSED

Question 5: rename While still in the misc directory using a relative path name, copy the file ‘bigfile’ from your home directory to the tutorial directory and rename it ‘bigfile2’.

Check Tests: Complete bigfile2 exists PASSED

Question 6: cp Make the directory work your current directory and using an absolute path name, copy the file ‘bigfile2’ in the tutorial directory to the scripts directory.

Check Tests: Complete scripts/bigfile2 exists PASSED

 

 

1/19/2020 Tutorial 2

https://linuxzoo.net/page/structure_tut2.html 3/3

Question 7: tilde We may use ~root for the home directory of the user root. Use cd and pwd to find the home directory of the user mysql

Home directory of mysql:

Check Tests: Complete mysql home FAILED

Question 8: case and space We can have spaces in our file and directory names (like Windows). File names and directory names are case sensitive (unlike Windows). Create directories with the following names in your home directories, use ls to check they are there.

My Documents gordon Gordon

Check Tests: Complete Crummy directory names PASSED Directories and not files PASSED My and Documents do not exist. 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

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

 

Open chat
Hello
How can we help you?