Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Change directory to PostgreSQL version and pg_log (or where you store the log files)
- ===
- cd /var/lib/pgsql/9.3/data/pg_log/
- List CSV logs older than 29 days
- ===
- find *.csv -mtime +29 -exec ls {} \;
- Truncate CSV logs older than 15 days
- ===
- find *.csv -mtime +15 -exec rm {} \;
Add Comment
Please, Sign In to add comment