While writing a shell script to build an initramfs for a yet-to-be-booted kernel version 6.8.2-custom, you must programmatically obtain only the names of any kernel modules that the Intel driver i40e.ko depends on. Which single modinfo command satisfies this requirement?
The option -F depends tells modinfo to print just the value of the depends field. This makes the output easy for a script to parse. The -k 6.8.2-custom switch directs modinfo to inspect the module tree for that specific, non-running kernel. Therefore, the command modinfo -k 6.8.2-custom -F depends i40e meets all stated requirements.
Why the other commands are wrong:
Using --field license prints the module's license, not its dependencies.
Using the -p switch is shorthand for the parameters field, so it lists tunable parameters rather than required modules.
Piping the default modinfo output through grep depends is not ideal for scripting because it includes the depends: label in the output text, which requires extra parsing to isolate only the module names.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the `modinfo` command do?
Open an interactive chat with Bash
What is the purpose of the `-F` option in `modinfo`?
Open an interactive chat with Bash
Why is `-k` used in the `modinfo` command?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .