Which command pipeline correctly counts the total files present in the current directory?
Explanation
Option A (ls | wc) uses the ls command to list files and pipes the output to wc, which counts lines, words, and characters. Although not the most precise method, it counts the number of files by counting lines. Option B (ls -l | wc -l) counts lines including the total line, which may not accurately reflect the file count. Option C (ls | wc -w) counts words, not files. Option D (ls | ws -c) includes a typo; 'ws' is not a valid command.