0
0
Intro to Computingfundamentals~10 mins

Linux overview in Intro to Computing - Interactive Code Practice

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

Complete the code to show the command that lists files in a directory.

Intro to Computing
ls [1]
Drag options to blanks, or click blank then click option'
A-l
B-z
C-x
D-q
Attempts:
3 left
💡 Hint
Common Mistakes
Using options that do not exist or do not show detailed file info.
Forgetting the dash before the option letter.
2fill in blank
medium

Complete the command to change the current directory to the home directory.

Intro to Computing
cd [1]
Drag options to blanks, or click blank then click option'
A/var
B/root
C/etc
D~
Attempts:
3 left
💡 Hint
Common Mistakes
Using absolute paths that are not the home directory.
Confusing system directories with user directories.
3fill in blank
hard

Fix the error in the command to display the current working directory.

Intro to Computing
[1]
Drag options to blanks, or click blank then click option'
Als
Bcd
Cpwd
Ddir
Attempts:
3 left
💡 Hint
Common Mistakes
Using cd which changes directory instead of showing it.
Using ls which lists files but does not show the current path.
4fill in blank
hard

Fill both blanks to create a command that shows the first 10 lines of a file named 'log.txt'.

Intro to Computing
[1] [2] log.txt
Drag options to blanks, or click blank then click option'
Ahead
Btail
C-10
D-f
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'tail' which shows the end of the file.
Using '-f' which follows the file continuously.
5fill in blank
hard

Fill all three blanks to create a command that finds all '.txt' files in the current directory and its subdirectories.

Intro to Computing
[1] . [2] '*.txt' [3]
Drag options to blanks, or click blank then click option'
Afind
B-name
C-type f
D-exec
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-exec' which runs commands on found files but is not needed here.
Omitting '-type f' which may include directories.