During a code-quality review you need a quick way to see whether any line in the file app/views.py exceeds your 120-character style limit. Which single option should you pass to wc so that the command prints only the length of the longest line in the file (followed by the file name)?
The wc option that reports the length of the longest line is -L (or its long form --max-line-length). It outputs a single integer representing the maximum display width of any line in the file, making it easy to compare that value against a style limit.
-m prints the total number of characters in the file, not the length of the longest line. -l prints the number of newline characters (effectively the line count). -w prints the number of words. None of these options provide the required longest-line measurement.
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 `wc` command do in Linux?
Open an interactive chat with Bash
Why is the -L option in `wc` useful for coding standards?
Open an interactive chat with Bash
How does `wc -L` differ from `wc -m` and `wc -l`?
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...
IT & Cybersecurity Package Join Premium for Full Access