0
0
Linux CLIscripting~10 mins

File system types (ext4, xfs) 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 ext4 file system on /dev/sdb1.

Linux CLI
mkfs.[1] /dev/sdb1
Drag options to blanks, or click blank then click option'
Afat32
Bxfs
Cext4
Dntfs
Attempts:
3 left
💡 Hint
Common Mistakes
Using mkfs.xfs instead of mkfs.ext4 for ext4 file system.
Using Windows file system types like ntfs or fat32.
2fill in blank
medium

Complete the command to create an XFS file system on /dev/sdc1.

Linux CLI
mkfs.[1] /dev/sdc1
Drag options to blanks, or click blank then click option'
Axfs
Bext4
Cext3
Dbtrfs
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing ext4 and xfs commands.
Using mkfs.ext3 or mkfs.btrfs instead of mkfs.xfs.
3fill in blank
hard

Fix the error in the command to create an ext4 file system on /dev/sdd1.

Linux CLI
mkfs.[1] /dev/sdd1
Drag options to blanks, or click blank then click option'
Axfs
Bext4
Cntfs
Dfat
Attempts:
3 left
💡 Hint
Common Mistakes
Using mkfs.xfs or mkfs.ntfs for ext4 file system creation.
Typing the wrong file system type after mkfs.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps device names to their file system types if the type is ext4.

Linux CLI
fs_map = {dev: fs for dev, fs in devices.items() if fs [1] [2]
Drag options to blanks, or click blank then click option'
A==
B'ext4'
C'xfs'
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' in the condition.
Checking for 'xfs' instead of 'ext4'.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps uppercase device names to their file system types only if the type is xfs.

Linux CLI
fs_map = {{ [1]: [2] for [3], fs in devices.items() if fs == 'xfs' }}
Drag options to blanks, or click blank then click option'
Adev.upper()
Bfs
Cdev
Dfs.upper()
Attempts:
3 left
💡 Hint
Common Mistakes
Using fs.upper() as key instead of dev.upper().
Using dev instead of dev.upper() for keys.
Filtering for 'ext4' instead of 'xfs'.