you're reading...
Linux, Linux Command

use ‘sed’ to list all content of a file after a specified word in Linux

In many cases, DBAs need to check the database log file. But if the database log contain million of rows how do we check the log by Date. Use ‘cat’ command will be very time consuming.

Here is an example:

sed -n -e '/Wed Sep 23/,$p' alert_testdb.log | more

About daviewning

I am an Oracle DBA


No comments yet.

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

%d bloggers like this: