Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #8 (permalink)  
Old 04-28-2009
Registered User
 

Join Date: Apr 2009
Posts: 12
Wink

you can use the following script to have a copy from the old messages file or you can remove it

#!/bin/ksh

SIZE=128
MESS_SIZE=`du -k /var/adm/messages |awk '{ print $1 ; }' `
if [ $MESS_SIZE -gt $SIZE ] ;
then
mv /var/adm/messages /var/adm/messages.1
#or you can remove it
#rm /var/adm/messages
touch /var/adm/messages
fi
Sponsored Links
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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" Linux Bot UNIX and Linux RSS News 0 01-04-2008 03:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM
check input = "empty" and "numeric" geoffry Shell Programming and Scripting 6 12-13-2007 05:12 AM
Command similar to "touch" for modify File size sriharshareddyk UNIX for Advanced & Expert Users 3 11-15-2007 01:43 AM
Maximum input file size in "Diff" Command Neeraja UNIX for Dummies Questions & Answers 1 01-17-2007 10:09 AM



All times are GMT -4. The time now is 12:01 PM.


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-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0