Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Ubuntu


Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-16-2008
Registered User
 
Join Date: Aug 2008
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
How to goto end of the file

Hi All

when I open a file with "less" command, how can i go to end of the file. I have very large file and if i do pagedown it takes long time to go end of the file. Any one have an idea. Thanks
Sponsored Links
    #2  
Old 09-16-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Computer Geek
 
Join Date: Jul 2008
Location: Frederick, MD
Posts: 748
Thanks: 4
Thanked 10 Times in 9 Posts
'shift g' will take you to the bottom.
Sponsored Links
    #3  
Old 09-16-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Location: Out running a Marathon.
Posts: 2,191
Thanks: 48
Thanked 127 Times in 119 Posts
Hammer & Screwdriver do a man tail

The tail command gives the last lines of a file. For instance,

Code:
tail -10 infile

will show last ten lines of the file called infile
    #4  
Old 09-17-2008
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
 
Join Date: Nov 2006
Location: Bulgaria
Posts: 1,419
Thanks: 0
Thanked 6 Times in 6 Posts
Ikon, Shift + G will take you to the bottom of the file only if you have opened the file in vi editor. Rather use Joey's suggestion, I think that tail filename, with no arguments passed to the command, will display the last 10 lines by default, at least on most distros.
Sponsored Links
    #5  
Old 09-17-2008
Registered User
 
Join Date: Apr 2008
Location: Calgary
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Shift + G will take you to the bottom of the file (and show you the last full screen of text) when streamed through "less"
Sponsored Links
    #6  
Old 09-17-2008
Technorati Master
 
Join Date: Mar 2005
Location: classification algos
Posts: 3,188
Thanks: 19
Thanked 28 Times in 25 Posts
Quote:
Originally Posted by avronius View Post
Shift + G will take you to the bottom of the file (and show you the last full screen of text) when streamed through "less"
This is what Sysgate mentioned, shift + G will take to the last line of the file, if the file is opened in vi
Sponsored Links
    #7  
Old 09-17-2008
Registered User
 
Join Date: Apr 2008
Location: Calgary
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
I'm simply trying to clarify that while:

Code:
# less filename

Shift + G while take the user to the end of the file. This appears to be counter to sysgate's statement.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using A Goto Label? Grizzly Shell Programming and Scripting 5 09-12-2009 08:56 AM
Goto last visted directory prasanth_babu Solaris 6 08-11-2008 03:17 AM
goto statement Krrishv Shell Programming and Scripting 5 02-21-2007 06:36 AM
Use of GOTO statement in scripts vikasduhan Shell Programming and Scripting 7 02-02-2006 11:50 AM
how to goto in ksh Geraldine Shell Programming and Scripting 4 03-12-2004 07:35 AM



All times are GMT -4. The time now is 02:35 AM.