The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
tail command and timestamp Begins Shell Programming and Scripting 6 04-16-2008 03:17 AM
Problem with Tail command --urgent pls subbukns Shell Programming and Scripting 4 09-21-2006 12:29 PM
tail command.. amon Shell Programming and Scripting 2 06-02-2006 05:36 AM
tail command whatisthis Shell Programming and Scripting 3 03-31-2005 10:34 AM
help with !(tail -2) command.. using pipes sdlayeeq UNIX for Advanced & Expert Users 8 02-17-2005 03:46 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-08-2002
clemeot clemeot is offline
Registered User
  
 

Join Date: Jul 2001
Location: Malaysia
Posts: 21
tail command in SUN & HP_unix

Hi any SUN expert,

All the while I using HP-Unix. Now when i turned into SUN environment, I not sure how the command should look like in SUN sys.

HP: tail -n3 file.log (this is the command i normally use)
SUN: tail [-n +3] [file.log] (this 1 not work, donno where went wrong)

Please help, thanks!
  #2 (permalink)  
Old 05-08-2002
killerserv's Avatar
killerserv killerserv is offline Forum Advisor  
Unix Predator
  
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
This is some of the Sun Solaris cman page for tail,

The following options are supported for /usr/xpg4/bin/tail only:
-c number : The number option-argument must be a decimal integer whose sign affects the location in the file, measured in bytes, to begin the copying: + Copying starts relative to the beginning of the file. - Copying starts relative to the end of the file. none Copying starts relative to the end of the file. The origin for counting is 1; that is, -c+1 represents the first byte of the file, -c-1 the last.

-n number: Equivalent to -cnumber, except the starting loca- tion in the file is measured in lines instead of bytes. The origin for counting is 1; that is, -n+1 represents the first line of the file, -n-1 the last.

Anyway do post your OS Specs. are you running solaris 8 ?
  #3 (permalink)  
Old 05-08-2002
clemeot clemeot is offline
Registered User
  
 

Join Date: Jul 2001
Location: Malaysia
Posts: 21
hey, anyway, thanks.

this command work

i found in HP-UX, "tail -n3 file.log"
in SUN, i use "tail -3 file.log", it is so simple :P

i am not sure what version is this server
also dont know how to check it
but it is Sun Solaris
  #4 (permalink)  
Old 05-08-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
no need for -n in HPUX for tail/head command...

BTW, You don't have to use the -n option for HPUX. I haven't used the -n option for several years, on either "head" or "tail" commands...

Are you using an old version of HPUX? 10.10 or older???

Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




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


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0