0
0
Linux CLIscripting~10 mins

Shell concept (Bash, Zsh) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to list all files in the current directory.

Linux CLI
ls [1]
Drag options to blanks, or click blank then click option'
A-l
B-a
C-x
D-z
Attempts:
3 left
💡 Hint
Common Mistakes
Using options that do not list hidden files
Typing options without dash
2fill in blank
medium

Complete the code to print the current working directory.

Linux CLI
[1]
Drag options to blanks, or click blank then click option'
Acd
Bls
Cpwd
Decho
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ls' which lists files
Using 'cd' which changes directory
3fill in blank
hard

Fix the error in the command to create a new directory named 'projects'.

Linux CLI
mkdir [1]
Drag options to blanks, or click blank then click option'
Aprojects
Bproject
C-p
Dproject_dir
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular form 'project'
Using option flags instead of directory name
4fill in blank
hard

Fill both blanks to create a file named 'notes.txt' and write 'Hello World' into it.

Linux CLI
[1] [2] 'Hello World'
Drag options to blanks, or click blank then click option'
Aecho
Bcat
C>
D>>
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cat' which reads files
Using '>>' which appends instead of overwriting
5fill in blank
hard

Fill all three blanks to list all files, including hidden ones, in long format sorted by modification time.

Linux CLI
ls [1] [2] [3]
Drag options to blanks, or click blank then click option'
A-a
B-l
C-t
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-r' which reverses order
Missing the option to show hidden files