Sponsored Content
Full Discussion: Purge files and archive
Top Forums Shell Programming and Scripting Purge files and archive Post 302357606 by rdcwayx on Wednesday 30th of September 2009 08:47:58 AM
Old 09-30-2009
Code:
cd /usr
tar  cvf - logfiles |gzip > /BIGSPACE/logfiles.tar.gz
rm logfiles/*.log

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Purge files, keep 3 versions of last 4 days

Hello, I currently generate a file every 15 minutes for 12 hours a day. I would like to clean the directory on a daily basis. I only want to keep the latest 3 versions for the last 4 days in the directory. Any suggestions? Thanks, Barbara (7 Replies)
Discussion started by: blt123
7 Replies

2. Shell Programming and Scripting

Read from file then purge or archive.

Hi All, I have a root directory /tmp and I want to purge files or archive files in its subsequent subfolders.I listed the path of files I want to purge(archive) and the #of days. (purge) DAYS PATH 7 /tmp/arsenal/* 5 /tmp/chelsea/* (archive? the same as above but different folders... (15 Replies)
Discussion started by: kayarsenal
15 Replies

3. UNIX for Dummies Questions & Answers

Find and purge a files in a dir

HI All, I have recuirement to purge the files in a directory . In that directory i an having many sub-directory . When i use find command like find ~/work/test/insert -name "*.*" -mtime +12 it is listing the file not accesed before 12 , It also takes the subdirectories inside the... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies

4. Shell Programming and Scripting

Purge files based on timestamp avl in file name

Dear All, I have the followoing requirement.. REQ-1: Suppose I have the following files XX_20070202000101.zip XX_20080223000101.zip XX_20080226000101.zip XX_20080227000101.zip XX_20080228000101.zip XX_20080229000101.zip Suppose sysdate = 29 Feb 2007 I need to delete all files... (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

5. Shell Programming and Scripting

shell script for archive purge

I am writing a shell script for Archive Purge for the table having rows < 1 year. The shell script has to extract the rows from the table and write those extracted rows to a text file. Then from the text file, each rows will be read and deleted by means of delete query one by one. The fields will... (5 Replies)
Discussion started by: regnumber
5 Replies

6. Shell Programming and Scripting

script to archive and purge

Hi, I am writing a shell script for archive data from a table. The design is as follows. Step 1: Execute the select query and extract the data into a text file. Step 2: The primary key for this table is TRACKING_NUM, TRACKING_NUM_SUFFIX, TIMESTAMP_UPDATED. So These three fields will be read... (1 Reply)
Discussion started by: kmanivan82
1 Replies

7. Shell Programming and Scripting

Shell script to check the files hourly and purge

I'm new to shell scripting... i have been given a task.. can any one help in this regard.... 1) Check hourly for files in <destination-path><destination-file-template><destination-file-suffix> for files older than <destination-file-retention> days and purge. It should then check... (1 Reply)
Discussion started by: satishpabba
1 Replies

8. Shell Programming and Scripting

To create a script and schedule which purge 30 days old files

Hi Friends, Very new in Unix and i got a requirement like writing a script and schedule it, so that it removes 30 days old files from all the log locations of a unix box. Suppose i have a unix server ltbamdev1 and in this server i have a mount point opt/bam. In this mount point i have 3... (1 Reply)
Discussion started by: duos
1 Replies

9. Homework & Coursework Questions

Archive and purge the log file

Hi Unix Experts, I am new in this filed. I have assignment to Archive and purge the log file using shell scripts I tried I could not get the result please help me this. Ex: test.log requirement : using shell script I need to archive the log file and nil and the content of (test.log)... (1 Reply)
Discussion started by: johney1981
1 Replies

10. Shell Programming and Scripting

Purge X old days files and Print count

Hello All, I am trying to purge X old days of files from directory & Sub directories ./2016-01-13/1500/abc.txt ./2016-01-14/1605/caf.txt ./2016-01-14/1605/caf2.txt ./2016-01-14/1606/eaf.txt ..... ./2017-08-1/1701/ Should also remove directories and sub directories too Expected... (7 Replies)
Discussion started by: krux_rap
7 Replies
BANDWIDTHD.CONF(5)						File Formats Manual						BANDWIDTHD.CONF(5)

NAME
bandwidthd.conf - configuration file for bandwidthd DESCRIPTION
The file, /etc/bandwidthd/bandwidthd.conf, is read by bandwidthd when started. It contains a small set of tunable options for bandwidthd features that can be adjusted. OPTIONS
subnet <network> <netmask> Subnet to log traffic for. dev <device> Device to listen on. skip_intervals <n> Number on intervals (2.5 minute) to skip between graphing. Default 0. graph_cutoff <kilobytes-minimum> Number of kilobytes required before drawing a graph for a host. Default 1024. promiscuous <bool> Put device in promisc ("eavesdropping") mode. Default true. output_cdf <bool> Write logfiles for analyzed traffic. Default false. recover_cdf <bool> Recover from logfiles after restart. Default false. Warning: This can take very long time if the logfiles are big. Enabling this and having bandwidthd start on system start might be a bad idea. It will delay your possibilities to log in locally since it's not done in the background. filter <pcap-filter-rule> Pcap filter rule to use. Always include "ip" to avoid weird problems. Default "ip". graph <bool> Write graphs and html for analyzed traffic. Default true. meta_refresh <seconds> Number of seconds before html-page reloads. 0 to disable. Default 150. FILES
/etc/bandwidthd/bandwidthd.conf - configuration file. /etc/init.d/bandwidthd - startscript. SEE ALSO
bandwidthd(8) Furter information available at the website: http://bandwidthd.sourceforge.net AUTHOR
This manual page was written by Andreas Henriksson <andreas@fatal.se>, for the Debian GNU/Linux system. 5 Jul 2004 BANDWIDTHD.CONF(5)
All times are GMT -4. The time now is 09:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy