Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

readme.md

Day 01

Welcome to the start of Challnges on the Topic Linux!

Introduction

In todays challenge we will use folders and files with the following commands

Prerequisites

  • an installed Ubuntu system or Ubuntu in WSL

Challenge

Challenge 1

At first we look at the man pages.

Challenge 2

  • Create a project folder with mkdir
mkdir project

Make the current user owner of the folder with chown

chown $USER project

Change into the folder with cd

cd project/

Challenge 3

Create a file with touch

touch file.txt

Open the file in the Texteditor vi

vi file.txt

Press i to be able to edit the file Write some text to the file

This is some text.

Exit the file by pressing Escape and :wq

  • Escape stops the insert mode.
  • w is for write
  • q is for quit

print the text from the file to the terminal with cat

cat file.txt

It should now display something like

user@host:~$ cat file.txt
This is some text.

We can also just get single words with awk

cat file.txt | awk '{print $3}'
user@host:~$ cat file.txt | awk '{print $3}'
some

Challenge 4

  • Analyze the Textfile netauto.txt
  • How can you print out the word conclusion?