How to goto end of the file | Unix Linux Forums | Ubuntu

  Go Back    


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

How to goto end of the file

Ubuntu


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-16-2008
s_linux s_linux is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 9 July 2013, 10:35 AM EDT
Posts: 90
Thanks: 0
Thanked 1 Time in 1 Post
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
Last Activity: 10 July 2013, 11:06 AM EDT
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
Last Activity: 15 August 2014, 1:39 PM EDT
Location: Out running a Marathon.
Posts: 2,322
Thanks: 70
Thanked 153 Times in 142 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
Last Activity: 20 November 2013, 8:29 AM EST
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
avronius avronius is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 22 May 2013, 8:38 AM EDT
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
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
 
Join Date: Mar 2005
Last Activity: 5 July 2014, 11:14 AM EDT
Location: classification algos
Posts: 3,203
Thanks: 19
Thanked 30 Times in 27 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
avronius avronius is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 22 May 2013, 8:38 AM EDT
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 05:26 AM.