HomeUNIXView a File with Line Numbers UNIX View a File with Line Numbers By Quinn McHenry 0 433 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. Δ - Advertisment - Most Popular Why Hostinger VPS Hosting is a Great Option Everything You Need to Know About Unlimited Web Hosting How to Resell Web Hosting Hostinger WordPress Hosting Review: Is It a Good Fit? Managed VPS Hosting: 8 of the Best Providers Load more Recent Comments William McCoy on How To Change Thumbs Up on Facebook Messenger Bazaarroom on 5 Great Tech Skills to Learn During Lockdown Andrea on How Do I Make the Icons Bigger on iPhone? Diane Gustavson on How to Enable Notification Sounds on Android TechyList on iPhone and Android: Automatically Add a Task to a To-Do List Using Email Ron on How to Apply Filters in Google Sheets Mobile Khaitan on Hostinger WordPress Hosting Review: Is It a Good Fit? Maxim Mirov on How to Get Link from Forbes for Free? Satyam on Hide Files and Folders in Windows Using Command Prompt Михаил on Photoshop: Change Default Unit from Inches to Pixels