1.3: Getting your CLI-feet wet
Source: Neo
Getting your feet wet
This ‘lab’ consists of a list of small tasks that introduce you to the command-line interface. None of these tasks should require exhaustive manual labour. Most can be accomplished by using the commands you already know (and that are listed at the cheat sheet), and for others a short Google session should give you the answer.
Navigation
- figure out in which folder you are at the moment
- navigate to the root folder of the OS
- navigate to your home folder (/home/username), without actually typing that path
- make an alias (
man alias
) that navigates to your home folder from everywhere within the system
File manipulation
- make a folder “myVeryOwnFolder”
- navigate into that folder
- create a file: hello.txt that contains the text hello world. Do this in a single step (hint: you can “pipe” commands together)
- move up on folder and remove the entire directory myVeryOwnFolder, including the .txt file
Access permissions
- create a new file with any content
- make this file read-only for everyone
- remove the file
- make a folder ToBeDeleted
- remove the execute rights from this folder for ALL users
- remove this folder
Various
- navigate to course-files/ch1_os (from your cloned git repository)
- all these files contain random text
- one file contains the word “bamboozle”
- find out which file contains this word
- find out the line number on which the word occurs
- search the man page for the meaning of “-x” in the command ls
- display the current date and time (is this correct? Why wouldn’t it be?)
- execute three commands, using the enter key only once
- display the current date and time
- sleep for 10 seconds
- display the current date and time