If you can see this check that

           prev section up prev page next page

Tutorial 2


Directories

User:
Password:

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!

Tests - not attempted
Update an account called demo, password demo UNTESTED

Question 2: Create a directory structure

In the demo account /home/demo create the directory structure shown:

                           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.

Tests - not attempted
Create directories UNTESTED

Question 3: cp

Copy the files /etc/group and /etc/vimrc into your misc directory.

Tests - not attempted
copy files UNTESTED

Question 4: Relative move

  • Make misc your current directory.
  • Move the file vimrc to the progs directory.
  • Use ls to verify that this worked.

Tests - not attempted
vimrc has moved UNTESTED

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'.

Tests - not attempted
bigfile2 exists UNTESTED

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.

Tests - not attempted
scripts/bigfile2 exists UNTESTED

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:

Tests - not attempted
mysql home UNTESTED

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
Tests - not attempted
Crummy directory names UNTESTED
Directories and not files UNTESTED
My and Documents do not exist. UNTESTED


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 |
Caine 13.0: Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Registry | 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 |
Kali 2020-4: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7 | 8a | 8b | 9 | 10 |
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions

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