Suppose you want to remove first 100 lines of a file named mail.log
First take the backup of the original file.
Check line count
#cat mail.log | wc –l
155
#cat mail.log | sed ‘1,10d’ >/tmp/mail_new.log
If you check the line count of newly created file mail_new.log
#cat mail_new.log | wc –l
145
Now you can rename mail_new.log with mail.log after taking the backup of original mail.log
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2009
(56)
-
▼
July
(8)
- While installing 10.2.0.3 Patchset software the OU...
- RMAN-08512: waiting for snapshot controlfile enqueue
- Change DBID of database
- Trim a file on HP_UX
- Installing CRS (Oracle Clustwerware)
- When and why to perform a full database export.
- Super fast Database Copying/Cloning
- Tuning Oracle's Buffer Cache
-
▼
July
(8)
About Me
- Rohit
- N.Delhi, Delhi, India
- I am an Oracle Certified Professional, Oracle 9i/10G DBA, having 4+ years of core DBA experience.
No comments:
Post a Comment