Copy Files for every 15 Minutes


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Copy Files for every 15 Minutes
# 1  
Old 09-15-2013
Copy Files for every 15 Minutes

Hi All;

I am trying to write the UNIX code for below requirement;

1) Copy a existing file for every minutes. File name should be appended with the file stamp.

2) When the file count reaches 10, the 11th file should over write the first created file and continues to copy the Source file for every minutes. All the time, there should be 10 copies only.

3) Repeat steps 2 & 3.


Please provide your inputs how to achieve this.

Thanks
Upendra.
# 2  
Old 09-15-2013
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
This User Gave Thanks to DukeNuke2 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Copy last 30 minutes' contents from a log file

Hi Guys, I am writing a bash script to capture the last 30 minutes's contents from log file to a new file. This job is a scheduled job and will run every 30 minutes. The log file is db2diag.log in DB2. I am having difficulties copying the last 30 minutes's contents. Can someone please help me.... (4 Replies)
Discussion started by: naveed
4 Replies

2. Shell Programming and Scripting

Grep a log file for the last 5 minutes of contents every 5 minutes

Hi all, System Ubuntu 16.04.3 LTS i have the following log INFO 2019-02-07 15:13:31,099 module.py:700] default: "POST /join/8550614e-3e94-4fa5-9ab2-135eefa69c1b HTTP/1.0" 500 2042 INFO 2019-02-07 15:13:31,569 module.py:700] default: "POST /join/6cb9c452-dcb1-45f3-bcca-e33f5d450105... (15 Replies)
Discussion started by: charli1
15 Replies

3. UNIX for Beginners Questions & Answers

How to convert days hours minutes seconds to minutes?

Hi, please help with below time conversion to minutes. one column values: 2 minutes 16 seconds 420 msec 43 seconds 750 msec 0 days 3 hours 29 minutes 58 seconds 480 msec 11 seconds 150 msec I need output in minutes(total elapsed time in minutes) (2 Replies)
Discussion started by: ramu.badugula
2 Replies

4. UNIX for Advanced & Expert Users

files older than 10 minutes

Hi, I have to find the files older than 10 minutes and remove those files as well as redirect the file names into a log file. i am using sun OS and my unix is not GNU and also not having perl. Could any one suggest me the way to approach. It would be great if script is provided. Also... (8 Replies)
Discussion started by: rohan10k
8 Replies

5. Shell Programming and Scripting

Files Deletion After 20 Minutes

Hi, everyone. Could you help me with deletion of files, which are 20 minutes old. I found out how to make deletion for files in that way : find <dir> -mtime n -exec rm -rf "{}" Could you offer your suggestions. Many thanks in advance. (5 Replies)
Discussion started by: KReoN
5 Replies

6. Shell Programming and Scripting

Find files which are <n> minutes old

Hi, i want to find certain files which are more than <n> minutes old,i have the command to find the files say <n> days old(as below) but not in terms of minutes. find . -name "14*.000" -type f -mtime +1 Is there any way to find this? Regards, Cherry (3 Replies)
Discussion started by: cherryven75
3 Replies

7. Shell Programming and Scripting

Convert minutes to hours, minutes, seconds

How would you convert lets say a 1000 minutes to hours, minutes, seconds (1 Reply)
Discussion started by: Vozx
1 Replies

8. UNIX for Advanced & Expert Users

find files onder than 15 minutes

Hi Friends, i have to write a script to raise a flag if there are any files that are older than 15 minutes in the directory.The directory is supplied as the parameter to the script. please help with a sample script. Thanks in advance veera (11 Replies)
Discussion started by: sveera
11 Replies

9. Shell Programming and Scripting

files older than 15 minutes

Hi Friends, i have to write a script to raise a flag if there are any files that are older than 15 minutes in the directory.The directory is supplied as the parameter to the script. please help with a sample script. Thanks in advance veera (0 Replies)
Discussion started by: sveera
0 Replies

10. Shell Programming and Scripting

finding files only minutes old?

I have files that are being created in a directory constantly. I want to be able write a script that would check this directory every 15 minutes and copy only the files that were newer than the files that were copied the previous 15 minutes. On linux, I found this to be as easy as running the... (2 Replies)
Discussion started by: cstovall
2 Replies
Login or Register to Ask a Question