HomeUNIXView a File with Line Numbers UNIX View a File with Line Numbers By Quinn McHenry 0 742 Share FacebookTwitterPinterestWhatsApp Using the cat command in UNIX, a file can be displayed with the line number of each line preceding the line. Here is an example of displaying the file filename with line numbers: cat -n filename TagscommandsdisplayfileUNIX Share FacebookTwitterPinterestWhatsApp Previous articleForce the speed and duplex of a Linux ethernet interfaceNext articleDisable ICMP echo (ping) responses in Linux Quinn McHenryQuinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York. RELATED ARTICLES Database View and Edit Two Files Side By Side in SQL Server and Notepad++ Apple Mac OS X and Unix Terminal: There are stopped jobs. Linux Unix: How to Set the System’s Date and Time LEAVE A REPLY Cancel reply Comment: Please enter your comment! Name:* Please enter your name here Email:* You have entered an incorrect email address! Please enter your email address here Website: Save my name, email, and website in this browser for the next time I comment. Most Popular Discover 5 Exciting Sites Like BitBetWin for Gamers Discover 5 Sites Like Chumba Casino for Fun Gameplay Top 5 Golden Treasure Casino Sister Sites You Must Explore Explore Sheesh Casino Sister Sites: Gaming Alternatives Discover Sweet Sweeps Casino Sister Sites: Top 5 Picks Load more LATEST REVIEWS Betwinner Philippines: The Coolest Spot for Sport Enthusiasts October, 2025 King Billy Casino Philippines Review: Join the Royal Court October, 2025 River Belle Casino New Zealand Review: Hop on the Boat October, 2025 Load more Recent Comments techylist on How to Create a Save Collection on Instagram Techylist on Get the Scoop on How to Use Twitter Moments in Just 5 Minutes! October, 2025 techylist on Get the Scoop on How to Use Twitter Moments in Just 5 Minutes! October, 2025 Alexzander E. Aguilar on How to Insert and Remove the SIM Card in an iPhone Glenn Thomas on How To Deploy ISPAC File & SSIS Package From Command Line Buck on How to Turn On and Off Automatic Updates in Windows 10 Anna Sue Edwards on How to View Facebook Login History Dante on How Do I Copy Text from a Password Protected Word Document? Darrin on How To Stop All Friend Requests On Facebook William McCoy on How To Change Thumbs Up on Facebook Messenger