Skip to content

Exercises for learning the command line in a Linux environment

Notifications You must be signed in to change notification settings

WeIgniteTech/command-line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Command line

Exercises for the command line interface module

How-to

Fork this repository under your GitHub profile and clone it. Read the instructions and commit and push your code to the same repository.

Each exercise is described on this page.

Overall description of the exercises

Exercise 1 - The terminal

Open and close a terminal window. Learn the shortcuts to open/close new tabs Use the exit command as well.

What do the following key strokes?

  • Ctrl + c
  • Ctrl + l
  • Ctrl + k

Exercise 2 - File structure

Use the commands ls, tree, cd and pwd and navigate into the file sturcture.

What does this command do?

  • cd
  • cd -
  • cd ..

Use some options with ls

  • ls -l
  • ls -h
  • ls -a

Can you combine them?

Use the command mkdir to create folders

Go to ex2 folder and create the following structure: src/main/java/tech/weignite/api/services and src/test/java/tech/weignite/api/services

Exercise 3 - File manipulation

use touch to create empty files and rm to delete them. Delete some folders.

Exercise 4 - Redirections

Go to ex4 folder and do the following:

Try cat > test.txt, type some characters, new lines with return, terminate input with ctrl+d Do you see the difference with cat >> test.txt ?

Try cat test.txt > new_test.txt and after cat test.txt >> new_test.txt. What is the difference between > and >>?

Use | and sort to sort the unsorted.txt file.

About

Exercises for learning the command line in a Linux environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published