Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd June 2008, 01:35 PM
savage's Avatar
savage Offline
Registered User
 
Join Date: Jun 2005
Location: Mission Control
Posts: 1,229
Command to reverse console output by line?

I can't seem to find a way to reverse the console output, for example, if I run 'tail -n 50 /var/www/logs/access_log', I want the output so the latest activity is at the top of the output, and gets older the further down you go.

Anyone know of a command I can pipe the output through to get this effect? I've checked the man pages for cat and tail, and they don't seem to support it.
Reply With Quote
  #2  
Old 22nd June 2008, 01:51 PM
kurzer Offline
Registered User
 
Join Date: Jun 2004
Location: Ulm, Germany
Age: 30
Posts: 129
Code:
tail -n 50 /var/www/logs/access_log | tac
tac is the reverse version of cat
Reply With Quote
  #3  
Old 23rd June 2008, 07:16 AM
savage's Avatar
savage Offline
Registered User
 
Join Date: Jun 2005
Location: Mission Control
Posts: 1,229
Ah, that makes sense.

Linux: It can do anything, I just need to learn the anything command

Thanks
Reply With Quote
  #4  
Old 23rd June 2008, 06:09 PM
soltanis Offline
Registered User
 
Join Date: May 2008
Posts: 54
Haha, tac. Ahhh...linux.
Reply With Quote
Reply

Tags
command, console, line, output, reverse

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command display output on console and simultaneously save the command and its output satimis Linux Chat 10 1st August 2008 03:02 AM
Where is the Command-line Console? spect Using Fedora 4 22nd April 2007 12:17 AM
Command line to get output on a file satimis Programming & Packaging 4 26th June 2005 02:21 PM


Current GMT-time: 21:04 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat