TechIt

Tail on Solaris / SunOS

Frustration with the tail command this morning on a box running Sun OS.

Initially, I couldn’t get it to tail a specified number of lines of a large text file.

On gnu/Linux I might use something like:
tail -n 50 my.log

On sunOs that command failed, and nothing else I immediately tried would work.

A search of available tail commands shows up a few hits

find /usr -name tail2>/dev/null
/usr/bin/tail
/usr/xpg4/bin/tail
...

And the result at

usr/xpg4/bin/tail works just like the gnu equivalent.

/usr/xpg4/bin/tail -n50 my.log

FWIW I’m on a box with SunOS 5.10 atm.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s