How to use the touch command: 2-Minute Linux Tips

How to use the touch command: 2-Minute Linux Tips

Assessment

Interactive Video

Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial explains the use of the 'touch' command in file management. It covers creating empty files, updating file timestamps, and using the '-R' option to match timestamps with another file. Additionally, it demonstrates how to use the 'stat' command to view detailed file information.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is one of the primary uses of the touch command?

To compress a file

To create a new directory

To delete a file

To ensure a file exists before a script runs

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you use the touch command on an existing file?

The file is deleted

The file's contents are changed

The file's date and time are updated

The file is moved to a new location

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which option allows you to set a file's date and time to match another file using the touch command?

-C

-A

-B

-R

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What command can be used to view all date-related information of a file?

echo

stat

ls

cat

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of using the touch command with the -R option?

The file is copied to another directory

The file's date and time are set to match another file

The file's permissions are changed

The file is renamed