Recap - Text Detective
Part of the Fundamentals section of Coddy's Terminal journey — lesson 36 of 82.
Challenge
EasyPut all your file content skills together! Run the following five commands in order:
- Show the first 3 lines of
server.log - Count the total number of lines in
server.log - Sort
fruits.txtin alphabetical order - Remove duplicate lines from
duplicates.txt - Find all error lines in
server.logwith their line numbers
You will need to run five commands in order. Think carefully about which command and flag each task requires!
Try it yourself
Terminal
All lessons in Fundamentals
4Directories
Create A DirectoryCopy A DirectoryMove And Rename A DirectoryDelete A DirectoryRecap - Directory Operations7File Content
Head And TailWord CountSort CommandUnique CommandGrep BasicsGrep With FlagsRecap - Text Detective2Navigation
Print Working DirectoryList FilesChange DirectoryAbsolute vs Relative PathsHome And Root DirectoryRecap - Find Your Way8Redirection
Standard OutputOverwrite To A FileAppend To A FileStandard InputStandard ErrorRecap - Log Builder6Wildcards And Patterns
The Star WildcardThe Question Mark WildcardBracket WildcardsCombining WildcardsRecap - Selective Operations9Piping
What Is A PipeChaining Two CommandsChaining Multiple CommandsPipe With GrepRecap - Data Pipeline