Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Text Editor Recommendation
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
HeadHolio
Guru
Guru


Joined: 10 Aug 2002
Posts: 445

PostPosted: Fri Oct 21, 2005 6:00 pm    Post subject: skip to end of file? Reply with quote

Anyone know how to jump to the end of a file with nano? Is this possible? I have log files that are huge and viewing them with nano without being able to skip to the end kinda sucks. I have the feeling I should probably be using vi instead......
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Sat Oct 22, 2005 7:03 am    Post subject: Re: skip to end of file? Reply with quote

HeadHolio wrote:
Anyone know how to jump to the end of a file with nano? Is this possible? I have log files that are huge and viewing them with nano without being able to skip to the end kinda sucks. I have the feeling I should probably be using vi instead......

Well, if holding down PgDn isn't an option for you, open a file with "nano <filename> +<linenumber>". So says man nano; if you know the line number you want, add it after the plus sign.

Better yet, since you're just viewing text (instead of writing it), use the tail utility. Try "tail -n 30 <filename>"; 30 is the number of lines to display from the end of the file. Adjust the number as you see fit. To get the last 27 lines of /var/log/messages, do:
Code:
# tail -n 27 /var/log/messages
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Sat Oct 22, 2005 10:28 am    Post subject: Re: skip to end of file? Reply with quote

HeadHolio wrote:
I have log files that are huge and viewing them with nano without being able to skip to the end kinda sucks.


less <logfile>
press 'G' to jump to the end ('g' for beginning)
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
chunderbunny
Veteran
Veteran


Joined: 31 May 2004
Posts: 1281
Location: 51°24'27" N, 0°57'15" W

PostPosted: Sat Oct 22, 2005 12:08 pm    Post subject: Reply with quote

Yeah, "less" is better for viewing logfiles. You can search by pressing "/" as well.
Back to top
View user's profile Send private message
HeadHolio
Guru
Guru


Joined: 10 Aug 2002
Posts: 445

PostPosted: Sat Oct 22, 2005 3:26 pm    Post subject: Perfect Reply with quote

Thanks guys. I think i'll use less from now on cause I usually don't know how many lines are in the log files.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Sun Oct 23, 2005 7:56 am    Post subject: Re: Perfect Reply with quote

HeadHolio wrote:
Thanks guys. I think i'll use less from now on cause I usually don't know how many lines are in the log files.
Another option is:
Code:
vim + <filename>
which takes you directly to the end of the file. Also, you can use "/" in vim to start searching if you want, "gg" to go to beginning of file, "G" to go to end of file.
Back to top
View user's profile Send private message
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 192
Location: Germany

PostPosted: Sun Oct 23, 2005 11:06 am    Post subject: Reply with quote

you know, to programm (c++, c or java), write textfiles and so on, i use emacs. It has has so many cool things. Theres xemacs, for x system, but i never use it
Back to top
View user's profile Send private message
djpharoah
Apprentice
Apprentice


Joined: 24 Nov 2004
Posts: 186
Location: Irvine, California USA

PostPosted: Sun Oct 23, 2005 11:04 pm    Post subject: Reply with quote

try gedit
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Sun Oct 23, 2005 11:24 pm    Post subject: Reply with quote

djpharoah wrote:
try gedit

If you read his first post, you might have noticed that he specifically didn't want something bundled with (or has dependecies for) KDE or Gnome. gedit is one of Gnome's dependencies. :roll:

Though I will say that gedit is a fine program; it gets the job done and is great for doing XML/XHTML/Javascript/CSS editing . . . its syntax highlighting is great, too.
Back to top
View user's profile Send private message
brianahr
Apprentice
Apprentice


Joined: 07 Oct 2004
Posts: 236
Location: USA

PostPosted: Mon Oct 24, 2005 7:57 am    Post subject: scite Reply with quote

Im surprised no one has suggested SciTE ( http://www.scintilla.org/SciTE.html ). Dont let the screenshot on their website fool you, this thing is actually quite awesome. Heres a screen of it running on my system: http://150.135.84.22/scite.jpeg
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Mon Oct 24, 2005 4:35 pm    Post subject: Re: scite Reply with quote

brianahr wrote:
Im surprised no one has suggested SciTE ( http://www.scintilla.org/SciTE.html ). Dont let the screenshot on their website fool you, this thing is actually quite awesome. Heres a screen of it running on my system: http://150.135.84.22/scite.jpeg

That looks like a more generic version of gedit (if that's possible :wink: ). Nice, though.
Back to top
View user's profile Send private message
blidside
n00b
n00b


Joined: 30 Jul 2002
Posts: 51
Location: Tampa, FL

PostPosted: Mon Oct 24, 2005 4:42 pm    Post subject: Reply with quote

scribes,
scribes.sourceforge.net

kinda cool concept - let the window manger manage windows, file manager manage files, and let scribes be a lightwight, syntax friendly editor.
Back to top
View user's profile Send private message
brims
Guru
Guru


Joined: 19 Apr 2004
Posts: 492
Location: Arizona

PostPosted: Mon Oct 24, 2005 7:02 pm    Post subject: Reply with quote

If you just want to view the last part of a log file you can use tail, default is the last 10 lines. If you want 16 lines, do tail -n <number> <logfile>.
Back to top
View user's profile Send private message
Urban Cowboy
n00b
n00b


Joined: 09 Oct 2007
Posts: 64

PostPosted: Fri Oct 12, 2007 12:27 am    Post subject: Re: scite Reply with quote

brianahr wrote:
Im surprised no one has suggested SciTE ( http://www.scintilla.org/SciTE.html ). Dont let the screenshot on their website fool you, this thing is actually quite awesome. Heres a screen of it running on my system: http://150.135.84.22/scite.jpeg


First page, 6th post.

EDIT: Whoops.. holy two years dead thread revival batman!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum