0
0
Linux CLIscripting~10 mins

touch (create empty files) 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 command to create an empty file named 'example.txt'.

Linux CLI
[1] example.txt
Drag options to blanks, or click blank then click option'
Arm
Btouch
Cmkdir
Dcat
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'mkdir' which creates directories, not files.
Using 'rm' which deletes files.
Using 'cat' which displays file contents.
2fill in blank
medium

Complete the command to create two empty files named 'file1.txt' and 'file2.txt' at once.

Linux CLI
[1] file1.txt file2.txt
Drag options to blanks, or click blank then click option'
Atouch
Bls
Ccp
Drm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'rm' which deletes files.
Using 'cp' which copies files.
Using 'ls' which lists directory contents.
3fill in blank
hard

Fix the error in the command to create an empty file named 'notes.txt'.

Linux CLI
[1] notes.txt
Drag options to blanks, or click blank then click option'
Atouch
Bmkdir
Crm -f
Decho
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'mkdir' which creates directories.
Using 'rm -f' which deletes files.
Using 'echo' which outputs text but does not create empty files.
4fill in blank
hard

Fill both blanks to create an empty file named 'log.txt' in the 'logs' directory.

Linux CLI
[1] logs/[2]
Drag options to blanks, or click blank then click option'
Atouch
Bfile.txt
Clog.txt
Dmkdir
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'mkdir' instead of 'touch' to create a file.
Using wrong filename in the path.
5fill in blank
hard

Fill all three blanks to create empty files named 'a.txt' and 'c.txt' in the current directory.

Linux CLI
[1] [2] [3]
Drag options to blanks, or click blank then click option'
Atouch
Ba.txt
Cb.txt
Dc.txt
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands other than 'touch'.
Using incorrect filenames or missing files.