Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to list files using an absolute path.
Linux CLI
ls [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using relative paths when an absolute path is required.
Not starting absolute paths with '/'.
✗ Incorrect
An absolute path starts from the root directory, which is '/'. So '/home/user/documents' is an absolute path.
2fill in blank
mediumComplete the command to change directory to a relative path.
Linux CLI
cd [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using absolute paths when a relative path is expected.
Starting relative paths with '/'.
✗ Incorrect
Relative paths do not start with '/'. 'logs' is a relative path to the current directory.
3fill in blank
hardFix the error in the command to copy a file using an absolute path.
Linux CLI
cp [1] /backup/ Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the leading '/' in absolute paths.
Using relative paths when absolute paths are needed.
✗ Incorrect
Absolute paths must start with '/'. '/home/user/file.txt' is the correct absolute path.
4fill in blank
hardFill both blanks to create a relative path command to move up one directory and then into 'projects'.
Linux CLI
cd [1]/[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '.' instead of '..' to move up.
Using absolute path '/projects' instead of relative.
✗ Incorrect
To move up one directory, use '..'. Then enter the 'projects' directory.
5fill in blank
hardFill all three blanks to create a command that lists files in the documents folder inside the user's home directory using an absolute path.
Linux CLI
ls [1]/[2]/[3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using relative paths instead of absolute.
Mixing up folder order in the path.
✗ Incorrect
The absolute path is '/home/user/documents'. This lists files in the documents folder inside the user's home directory.