Search Results

Search: Posts Made By: vis1512
18,954
Posted By vis1512
`init 5` powers off the box in Solaris.. Check it...
`init 5` powers off the box in Solaris.. Check it out whether it works in HP-UX as well.
4,578
Posted By vis1512
#! /bin/sh [ $(date "+%H")-eq 0 ] && (mv...
#! /bin/sh
[ $(date "+%H")-eq 0 ] && (mv path/to/today.txt /path/to/yesterday.txt)
echo "Time: $(date +%T) Users: $(who | wc -l)" >> /path/to/today.txt

Run this script thru crontab every 10...
Forum: Solaris 08-06-2010
3,346
Posted By vis1512
#! /bin/sh DATE=$(date "+%m-%d-%Y) ...
#! /bin/sh
DATE=$(date "+%m-%d-%Y)
LOG=<path_to_your_log>
test –f $LOG && mv $LOG $LOG.$DATE && gzip $LOG.DATE
## hup the $LOG writing process if needed with kill -HUP
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 01:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy