Linux CLI - Pipes and RedirectionWhat does the command cat < file.txt do in Linux?AWrites the contents of file.txt to a new fileBReads the contents of file.txt and displays it on the screenCDeletes the file.txtDCreates a new empty file named file.txtCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand stdin redirection with <The < symbol redirects input from a file to a command instead of the keyboard.Step 2: Apply to the cat commandcat reads from stdin by default, so using < file.txt makes cat read from file.txt and print its contents.Final Answer:Reads the contents of file.txt and displays it on the screen -> Option BQuick Check:stdin redirection < = input from file [OK]Quick Trick: Use < to feed file content as input to commands [OK]Common Mistakes:Confusing < with output redirection >Thinking it deletes or creates filesAssuming it modifies the file content
Master "Pipes and Redirection" in Linux CLI9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Linux CLI Quizzes Disk and Storage - mount and umount - Quiz 9hard Process Management - nohup for persistent processes - Quiz 6medium Process Management - nohup for persistent processes - Quiz 1easy Process Management - jobs command - Quiz 14medium Searching and Finding - Why finding files saves time - Quiz 6medium Text Processing - sed (stream editor) basics - Quiz 10hard Text Processing - awk patterns and actions - Quiz 10hard Text Processing - awk patterns and actions - Quiz 12easy Text Processing - cut (extract columns) - Quiz 5medium Text Processing - grep with regex (-E) - Quiz 13medium