![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rolling back time | Cameron | UNIX for Dummies Questions & Answers | 5 | 03-26-2002 09:31 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
log rolling
Hi,
I'm thinking of running a script via cron (every hour) to do the log rolling. The file is "file.txt" and there going to be 10 files rolling (file.txt.n). The file is being written constantly by an application. The script will do the following: 1. cat file.txt > file.txt.0 2. cat /dev/null >file.txt 3. i=9 4. while [ $i -ge 0 ]; do mv file.txt.$i file.txt.($i+1) i=$i-1 done What would be the possible issues w.r.t. file handling or loosing data ? Thanks Ch. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|