Sponsored Content
Full Discussion: Rotate log files
Top Forums Shell Programming and Scripting Rotate log files Post 302339230 by zaxxon on Thursday 30th of July 2009 05:30:09 AM
Old 07-30-2009
Post an example of the input, desired output and use CODE-tags (might want to use the #-button in the edit bar up there) when doing so, ty.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to rotate log files

hi friends i need a shell script to rotate the logs in a directory, dated n days back. can anybody of help. appreciate.. (0 Replies)
Discussion started by: satya_skm
0 Replies

2. UNIX for Advanced & Expert Users

log rotate

hi , what is the meaning of log rotate? how do i rotate /var/adm/wtmps log and gzip it? (6 Replies)
Discussion started by: cromohawk
6 Replies

3. Shell Programming and Scripting

Script for Log Rotate

Hello, I only know the basic for shell programing. I need help for this, I thinks this is a basic for anyone who know a litle of shell scripting. I need creat a script for a rotatate logs, when a filesystem is full. I have a filesystem. The rotate consist in zip the current log (copy) and... (1 Reply)
Discussion started by: El Rengo
1 Replies

4. Shell Programming and Scripting

cron script to rotate log files

I have a mac server. I have been having problems with my logs. My hard disk became full, when i researched into why it was full it was due to massive log files. There was barley any log rotation policies in place on the server. I tired to use logrotate. This doesn't work on my server. It is a MAC... (19 Replies)
Discussion started by: timgolding
19 Replies

5. Shell Programming and Scripting

Help with a rotate log script

Hi all, Am trying to write my own log rotate script. Curremtly, what I have is as below: #!/bin/ksh file_to_rotate=${1} x=${2} while ] do let curr=${x} let prev=${x}-1 if ] ; then #echo "cp -p ${file_to_rotate} ${file_to_rotate}.${curr}" cp -p... (7 Replies)
Discussion started by: newbie_01
7 Replies

6. Shell Programming and Scripting

Script to rotate file log

Hi Experts, I have script on crontab and give output quite large. I would like to know how to create rotate log when the size of log maximum 50MB if the test.log is 50MB then create test.0 Thanks Edy (2 Replies)
Discussion started by: edydsuranta
2 Replies

7. UNIX for Dummies Questions & Answers

How to rotate the log messages?

Hi, i want to log rotate the /var/adm/messages file after reaching the specified limit and delete those logs. how do i do that. i you solaris 10 OS ,Please help me in doing the same.... (2 Replies)
Discussion started by: Rahulne25
2 Replies

8. Shell Programming and Scripting

Log rotate

Hi, I have below script in logrotate.d to rotate logs. logs are not rotating after the file grow to 1k, do you have any idea? Is it because of it just only 1K? Please let me know if the below syntax is in correct. # more trotate /sourcepath/*/servers/*/logs/*log... (2 Replies)
Discussion started by: lpprasad321
2 Replies

9. UNIX for Advanced & Expert Users

Apache log rotate configuration

HI i was trying to configure logrotate for my apache server and it's not working properly. here is my lodrotate configuration /var/log/httpd/*log { daily missingok notifempty sharedscripts compress delaycompress postrotate /sbin/service httpd... (1 Reply)
Discussion started by: bentech4u
1 Replies

10. Red Hat

Apache log rotate configuration

HI i was trying to configure logrotate for my apache server and it's not working properly. Os: Red Hat 6 here is my lodrotate configuration /var/log/httpd/*log { daily missingok notifempty sharedscripts compress delaycompress postrotate ... (3 Replies)
Discussion started by: bentech4u
3 Replies
DEBCONF-APT-PROGRESS(1) 					      Debconf						   DEBCONF-APT-PROGRESS(1)

NAME
debconf-apt-progress - install packages using debconf to display a progress bar SYNOPSIS
debconf-apt-progress [--] command [args ...] debconf-apt-progress --config debconf-apt-progress --start debconf-apt-progress --from waypoint --to waypoint [--] command [args ...] debconf-apt-progress --stop DESCRIPTION
debconf-apt-progress installs packages using debconf to display a progress bar. The given command should be any command-line apt frontend; specifically, it must send progress information to the file descriptor selected by the "APT::Status-Fd" configuration option, and must keep the file descriptors nominated by the "APT::Keep-Fds" configuration option open when invoking debconf (directly or indirectly), as those file descriptors will be used for the debconf passthrough protocol. The arguments to the command you supply should generally include -y (for apt-get or aptitude) or similar to avoid the apt frontend prompting for input. debconf-apt-progress cannot do this itself because the appropriate argument may differ between apt frontends. The --start, --stop, --from, and --to options may be used to create a progress bar with multiple segments for different stages of installation, provided that the caller is a debconf confmodule. The caller may also interact with the progress bar itself using the debconf protocol if it so desires. debconf locks its config database when it starts up, which makes it unfortunately inconvenient to have one instance of debconf displaying the progress bar and another passing through questions from packages being installed. If you're using a multiple-segment progress bar, you'll need to eval the output of the --config option before starting the debconf frontend to work around this. See "EXAMPLES" in the EXAMPLES section below. OPTIONS
--config Print environment variables necessary to start up a progress bar frontend. --start Start up a progress bar, running from 0 to 100 by default. Use --from and --to to use other endpoints. --from waypoint If used with --start, make the progress bar begin at waypoint rather than 0. Otherwise, install packages with their progress bar beginning at this "waypoint". Must be used with --to. --to waypoint If used with --start, make the progress bar end at waypoint rather than 100. Otherwise, install packages with their progress bar ending at this "waypoint". Must be used with --from. --stop Stop a running progress bar. --no-progress Avoid starting, stopping, or stepping the progress bar. Progress messages from apt, media change events, and debconf questions will still be passed through to debconf. --dlwaypoint percentage Specify what percent of the progress bar to use for downloading packages. The remainder will be used for installing packages. The default is to use 15% for downloading and the remaining 85% for installing. --logfile file Send the normal output from apt to the given file. --logstderr Send the normal output from apt to stderr. If you supply neither --logfile nor --logstderr, the normal output from apt will be discarded. -- Terminate options. Since you will normally need to give at least the -y argument to the command being run, you will usually need to use -- to prevent that being interpreted as an option to debconf-apt-progress itself. EXAMPLES
Install the GNOME desktop and an X window system development environment within a progress bar: debconf-apt-progress -- aptitude -y install gnome x-window-system-dev Install the GNOME, KDE, and XFCE desktops within a single progress bar, allocating 45% of the progress bar for each of GNOME and KDE and the remaining 10% for XFCE: #! /bin/sh set -e case $1 in '') eval "$(debconf-apt-progress --config)" "$0" debconf ;; debconf) . /usr/share/debconf/confmodule debconf-apt-progress --start debconf-apt-progress --from 0 --to 45 -- apt-get -y install gnome debconf-apt-progress --from 45 --to 90 -- apt-get -y install kde debconf-apt-progress --from 90 --to 100 -- apt-get -y install xfce4 debconf-apt-progress --stop ;; esac RETURN CODE
The exit code of the specified command is returned, unless the user hit the cancel button on the progress bar. If the cancel button was hit, a value of 30 is returned. To avoid ambiguity, if the command returned 30, a value of 3 will be returned. AUTHORS
Colin Watson <cjwatson@debian.org> Joey Hess <joeyh@debian.org> 2011-06-22 DEBCONF-APT-PROGRESS(1)
All times are GMT -4. The time now is 11:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy