Welcome to the start of Challnges on the Topic Linux!
In todays challenge we will use folders and files with the following commands
- an installed Ubuntu system or Ubuntu in WSL
At first we look at the man pages.
- Create a project folder with mkdir
mkdir projectMake the current user owner of the folder with chown
chown $USER projectChange into the folder with cd
cd project/Create a file with touch
touch file.txtOpen the file in the Texteditor vi
vi file.txtPress 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.txtIt 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- Analyze the Textfile
netauto.txt - How can you print out the word conclusion?