Logs archiving


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Logs archiving
# 1  
Old 06-23-2014
Logs archiving

Hi ,

Might be the very basic question and most frequent one also..

wanted to archive the logs/files older than one month or older than 30 days to some particular location.

File/log format is like below

ABCD_EF_GHIJ_Defaulter_Report_(06-Jun-2014_11-50-20_AM)

Source : /test/ABC
Destinatio : /test/archive

Falovour is Redhat 6.1
# 2  
Old 06-23-2014
Quote:
Originally Posted by Riverstone
. . .
Might be the very basic question and most frequent one also..
. . .
Yes it is.
Did you search these fora for possible answers/solutions?
# 3  
Old 06-27-2014
Looking for the single line command specific for the above query which i can add directly in a cron.
pls help
# 4  
Old 06-27-2014
Quote:
Originally Posted by Riverstone
Looking for the single line command specific for the above query which i can add directly in a cron.
pls help
The command is 'find'.
Using the '-exec ' option.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. Shell Programming and Scripting

Archiving in Perl

Hi Guys i am experiencing this problem when trying to archive a file in perl. the files name is created dynamically. (my $date = `date +"%d%m%Y"`;) `tar czf /opt/memex/backups/Complete$date.tar.gz /opt/memex/backups/Complete$date`; error message: tar: Cowardly refusing to create an empty... (4 Replies)
Discussion started by: Grant Pryor
4 Replies

3. Shell Programming and Scripting

Simple archiving

Hi, I am a UNIX novice and was trying to write a bash script that would read two parameters, $1 would be the archive file path where the archiving path is passed, so the archiving script will write to this file path. The second parameter will be the directory path to the library which will... (0 Replies)
Discussion started by: pernuntium
0 Replies

4. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

Hi, I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows: """"""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies

5. Shell Programming and Scripting

Archiving the files

Hi, Suppose I have 2 files of yesterday's. And today I have received 3 files. Before processing anything I want to archieve the 2 files of yesterday's into a different folder. How can this be done? Regards, Sunitha (1 Reply)
Discussion started by: Sunitha_edi82
1 Replies

6. UNIX for Dummies Questions & Answers

Archiving Problem

Hi friends I work on UNIX Operating system and I have many servers. ADM server make archiving for special data every day inside XYZ directory at specific time,the next time SPERADM server will take that archiving data to put them in same directory (inside SPERADM server). Now archiving... (2 Replies)
Discussion started by: bintaleb
2 Replies

7. Shell Programming and Scripting

Archiving

Hi, I want to archive below directory ex: /home/oracle/dd0 sub-directories in dd0 /home/oracle/dd0/backup/backup1 /home/oracle/dd0/backup/backup2 /home/oracle/dd0/dmp ....etc I want a command(tar) which will let me archive the above directory excluding *.dmp(dump files), *.log(log... (1 Reply)
Discussion started by: dreams5617
1 Replies

8. Shell Programming and Scripting

Archiving Users

Hello Gurus, I have a requirement where I have to remove users that have not logged into our unix box last 90 days. I want to script this one and remove the users automatically now and then. Has any one ever done this before, if so please give me some sample code. I am not a good unix... (2 Replies)
Discussion started by: suseesk
2 Replies

9. UNIX for Dummies Questions & Answers

Archiving

I am looking for some advice. I have some files on a Unix server, which contain symbolic links. I need to copy these over to a nfts environment, but wish to keep the symbolic links intact. Any ideas? (7 Replies)
Discussion started by: rmasonuk
7 Replies
Login or Register to Ask a Question