Sponsors
Top Content
- How To Control Fan Speeds in Ubuntu
- Linux Mint 15 Cinnamon: Ready For Prime Time
- 6 Things To Do After Installing Ubuntu 13.04
- Remove Old Kernels In Ubuntu With One Command
- Linux Mint 15 "Olivia" Released!
- Distro Review: Xubuntu 13.04 Raring Ringtail
- How to Configure Apache Web Server on Linux
- Installing a LAMP Server on Ubuntu
- How To Rotate The Screen in Ubuntu With The Nvidia Driver
- Send Gmail from the Linux Command Line
Command Line Basics: View Text Files with more
One of the things you may find you want to do often from your command line is to view the contents of a text file. This could be to view the contents of some startup script or just one of your own basic configuration files like .bashrc or .bash_aliases. The command is simple to use. Just type more followed by the file name. Here's an example (assuming you have X installed).
You should now see the first screenfull of text in the file displayed on your terminal. To see more of the file, just hit the spacebar, and more will show you the next screenfull of text. You can also move back up the file by pressing the [B] key. (This trick only works when viewing files, it doesn't work on piplined input.) When you've seen enough, you can get back to your command line prompt by pressing the [Q] key.
Pipelining Command Output to more
Another way to use more is when you have a large amount of text output from a command that exceeds the size of your terminal window. Say you want to view the directory listing of a large directory like /etc. This directory can contain a lot of files and require you to scroll up to see the beginning of a listing. No big deal if you're in a graphical log-in session. But what if you're on a terminal log-in session? There is no scroll bar. more to the rescue!
As you can see, more can be a handy tool to have in your ever expanding command line arsenal.
But wait, there's less!
You read that correctly. There's an improved text viewing utility that expands upon the functionality provided by more; the ironically named less. I'll cover that one in another post.
Related posts:
Tags: command line, HowTo, linux
Comments
3 Responses to “Command Line Basics: View Text Files with more”
Leave a Reply Cancel reply
Subscribe by email
Categories
Tags
Apache Apple audio avast bash Chromium command line dell Distro Review fedora firefox flac gadgets gnome google google chrome grub GStreamer HowTo HP humor ImageMagick jaunty karmic koala LAMP linux Linux Mint Lucid Lynx mp3 Nautilus netbook network news ogg open source opinion phpMyAdmin review security text edit Ubuntu usb web development windows WordPress-
Archives
- ▼ 2013 (9)
- ► 2012 (19)
- ► 2011 (25)
- ► 2010 (56)
- ► Dec (4)
- ► Nov (3)
- ► Oct (4)
- ► Sep (4)
- ► Aug (3)
- ► Jul (5)
- ► Jun (4)
- ► May (8)
-
- How To Rotate The Screen in Ubuntu With The Nvidia Driver
- Lynx: A Text Only Web Browser
- Midori - A Lightweight Web Browser
- From The "WTF, Apple?" Dept.
- There's Always One Bad Apple
- Ubuntu on "The Big Bang Theory"
- Organize Your Recipes with Gourmet Recipe Manager
- Add an Open Terminal Button to Nautilus
- ► Apr (6)
- ► Mar (5)
- ► Feb (3)
- ► Jan (7)
- ► 2009 (88)
- ► Dec (4)
- ► Nov (5)
- ► Oct (7)
- ► Sep (6)
- ► Aug (13)
-
- Enable The RT2860STA Linux Wireless Driver
- Fade Out Images with GIMP
- Command Line Basics: Redirecting Output
- Command Line Basics: View Files With cat
- Command Line Basics: Determine File MIME Types
- Batch Watermark Images in Linux
- How To Watermark Images With ImageMagick in Linux
- Nautilus Script to Launch a Terminal
- SUSE Studio Screenshot Tour
- Edit Your GNOME Configuration
- Open Source Apps for Windows to Introduce Users to FOSS
- Name The Next Apple Product
- Fast Boot Your PC With Xandros Presto
- ► Jul (5)
- ► Jun (7)
- ► May (11)
-
- Command Line Basics: Create Custom Commands with Alias
- Command Line Basics: List Files with ls
- Space Saving Tips for Your GNOME Desktop
- Windows Web Browser Shootout
- Command Line Basics: Navigating the File System
- Bash to Basics: Print Text with echo
- Command Line Basics: echo
- Install the Firefox 3.5 Beta in Linux
- Create a Bootable USB Drive with Ubuntu and FreeDOS
- Revert the Update Behavior in Jaunty to the Old Way
- Who Needs Windows?
- ► Apr (11)
-
- Install Picasa 3.0 for Linux (beta)
- Eight Reasons Your Next Computer Should Run Linux
- Jaunty Boots 32% Faster on the MSI Wind
- The Jackalope is Jaunting!
- Windows 7 Won't Close the Door For Linux
- Upgrade Ubuntu with a CD Image
- Get a Jump on Jaunty Jackalope
- Secure File Transfer in Nautilus with SFTP
- Add the NT Backup Tool to Windows XP
- Why I hate Dell
- How To Install AVG Antivirus 7.5 in Ubuntu
- ► Mar (13)
-
- Create an Encrypted Folder in Ubuntu with Cryptkeeper
- How To Create Multiple Firefox Profiles in Windows
- Install the Fedora 10 Desktop Theme in Ubuntu
- Download the Fedora 10 Wallpaper
- How To Install the Echo Icon Theme in Ubuntu
- How To Install the Nodoka Theme Engine in Ubuntu
- Create Your Own .deb Packages with Checkinstall
- Install Your Own Ringtones with Ubuntu and BitPim
- Install Multimedia Codecs in Ubuntu 8.04
- Use Linux to Solve the Linux Journal Scramble
- Dvorak Rings Death Knell for Microsoft's Business Model
- Microsoft to Release Windows Linux!
- Review: Sabrent 68 in 1 Internal Card Reader
- ► Feb (2)
- ► Jan (4)
- ► 2008 (37)
- ► Dec (8)
-
- Update: Logitech LX8 in Ubuntu
- Create a Button to Restart USB in Ubuntu
- Create an Ubuntu Live USB Drive
- Install Fedora Cursor Theme in Ubuntu
- Change the Week Start Day in Ubuntu
- Automatically Update the ClamAV Virus Database
- Add On-Demand Virus Scanning to Nautilus
- Put Your Own Face on Tux - Wii Fit Review
- ► Nov (6)
- ► Oct (8)
-
- Ubuntu 8.10 is Out!
- Split mp3 Files With mp3splt
- How To Install RealPlayer 11 in Ubuntu
- How To Install Free42 in Ubuntu
- Review - Sony MDR-NC6 Noise Canceling Headphones
- How To Set Up a Home Network With Ubuntu, Part 3
- How To Set Up a Home Network With Ubuntu, Part 2
- How To Set Up a Home Network With Ubuntu, Part 1
- ► Sep (6)
- ► Aug (9)
-
- How To Control Fan Speeds in Ubuntu
- How To Install avast! Antivirus in Windows XP
- How to Launch a Program in Ubuntu Without Using The Menu
- Review - Logitech LX8 in Windows XP
- Google Starts "Free The Airwaves" PR Campaign
- Review - Logitech LX8 Cordless Laser Mouse
- Subway Doesn't Like Linux!
- How To Add An Item To Ubuntu's Menu
- How to resample MP3 audio files on Linux using LAME
Favorite Sites



Story added...
This story has been submitted to fsdaily.com! If you think this story should be read by the free software community, come vote it up and discuss it here:
http://www.fsdaily.com/Beginner/Command_Line_Basics_View_Text_Files_with_more
There is a few good reasons why to use less instead of more. For instance; less does not cache the file like more do.
Max - Thanks for the comment. I didn't know that about the cacheing. I'm only familiar with the differences in how more and less behave for the user.