Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 09-16-2008
Ikon's Unix or Linux Image
Ikon Ikon is offline Forum Advisor  
Computer Geek
 
Join Date: Jul 2008
Last Activity: 15 January 2015, 10:57 AM EST
Location: Frederick, MD
Posts: 748
Thanks: 4
Thanked 11 Times in 10 Posts
'shift g' will take you to the bottom.
Sponsored Links
    #3  
Old Unix and Linux 09-16-2008
joeyg's Unix or Linux Image
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 27 May 2015, 9:01 AM EDT
Location: Within two miles of a Dunkin donuts.
Posts: 2,355
Thanks: 84
Thanked 162 Times in 148 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 Unix and Linux 09-17-2008
sysgate's Unix or Linux Image
sysgate sysgate is offline Forum Advisor  
Unix based
 
Join Date: Nov 2006
Last Activity: 18 December 2014, 3:49 AM EST
Location: Bulgaria
Posts: 1,420
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 Unix and Linux 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 Unix and Linux 09-17-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
 
Join Date: Mar 2005
Last Activity: 9 April 2015, 4:19 AM EDT
Location: classification algos
Posts: 3,206
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 Unix and Linux 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 06:15 AM.