Sponsored Content
Top Forums Shell Programming and Scripting Collect files for specific hours Post 302887112 by Saidul on Wednesday 5th of February 2014 05:08:40 PM
Old 02-05-2014
Question Collect files for specific hours

I have to fetch files from a location hour wise.
Eg files available at location /tmp/data/ are
A20140205.1300-1315......
.
.

A20140205.1400-1415......
.
.

A20140205.1700-1715......
.
.
.
.


Below is the code I have prepared.
But it works only for one hour.
For instance A20140205.14*,copies files with only 14 hour..

touch WX7_GP_20140205.tar
find /tmp/data -type f -name "A20140205.14*" | xargs tar rvf $HOME/sts/WX7_GP_20140205.tar


My requirement is to copy files from 13 hour to 18 hour or all files with names from A20140205.13 to A20140205.18...
How do i achieve this??
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

delete files that are over 2 hours old

guys, I have a need for a script that will delete all files in a given directory that are over 2 hours old. I will set this up to run in cron. I'm having a little trouble coming up with the syntax that will identify these files. Is there a variation of the ls command that I can use to identify... (3 Replies)
Discussion started by: hedrict
3 Replies

2. Shell Programming and Scripting

How do i collect date and time for list of files in a directory

How do i collect date and time for list of files in a directory using AWK Command (4 Replies)
Discussion started by: laknar
4 Replies

3. Shell Programming and Scripting

Files created in last 24 hours

I need a script which list the files which is starting with the word heap*** and that is created before past 24 hours.I need the script using find command. please help me on this. (1 Reply)
Discussion started by: jayaramanit
1 Replies

4. Shell Programming and Scripting

How to calculate specific hours between 2 dates

Hi there, I am trying to find out a way to calculate how many hours are between 2 dates but from a specific time range, actually working hours (Monday to Friday 09:00 - 18:00). What I mean is for example date1 = Monday 21 July 2008 22:00:00 so in python 2008-07-21 22:00:00 date2 = Wednesday... (5 Replies)
Discussion started by: sickboy
5 Replies

5. Shell Programming and Scripting

How to find files by hours old?

I need to be able to do the following: Find files in multiple directories that are 6 hours older than the current time? I am using KSH I tried mmtime but it was not a valid option Any help would be great. Thank you! (2 Replies)
Discussion started by: llsmr777
2 Replies

6. Shell Programming and Scripting

how to list files between last 6 hours to 3 hours

Hi Frens, I want to list some files from a directory, which contains "DONE" in their name, i am receiving files every minute. In this i want to list all the files which are newer than 6 hours but older than 3 hours, of current time i dont want my list to contain the latest files which are ... (4 Replies)
Discussion started by: Prat007
4 Replies

7. Shell Programming and Scripting

How to collect all the list of files along with the permissions

Hi guys, I have one problem. I need collect the list files along with the file permissions in all directories in one server. Is their any easy way to collect using any commands or any scripts? Advance Thanks :) (2 Replies)
Discussion started by: kartheek
2 Replies

8. UNIX Desktop Questions & Answers

collect data from files

there are 200 files named file1_0.pdb,file1_60.pdb etc....it looks like: ATOM 1 N VAL 1 8.897 -21.545 -7.276 1.00 0.00 ATOM 2 H1 VAL 1 9.692 -22.015 -6.868 1.00 0.00 ATOM 3 H2 VAL 1 9.228 -20.766 -7.827 1.00 0.00 ATOM 4 H3 ... (5 Replies)
Discussion started by: kanikasharma
5 Replies

9. UNIX for Advanced & Expert Users

Collect files from different servers to a single server and append them

Hi, I have script1.sh on 3 servers. I want to collect output report generated by them to a single server and append all the reports. Please tell me how can i do this? (2 Replies)
Discussion started by: pratikm23
2 Replies

10. UNIX for Dummies Questions & Answers

Script to collect log files in case of server crash

Environmnet: HP-UX B.11.31 U ia64 RDBMS: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production Question: When server hangs or node evicts, we open up tickets with Oracle Support and Oracle Support ask for some list of log files. Currently we can not use the... (2 Replies)
Discussion started by: Siva SQL
2 Replies
UUCP(1C)																  UUCP(1C)

NAME
uucp, uulog - unix to unix copy SYNOPSIS
uucp [ option ] ... source-file ... destination-file uulog [ option ] ... DESCRIPTION
Uucp copies files named by the source-file arguments to the destination-file argument. A file name may be a path name on your machine, or may have the form system-name!pathname where `system-name' is taken from a list of system names which uucp knows about. Shell metacharacters ?*[] appearing in the pathname part will be expanded on the appropriate system. Pathnames may be one of(1) a full pathname; (2) a pathname preceded by ~user; where user is a userid on the specified system and is replaced by that user's login directory; (3) anything else is prefixed by the current directory. If the result is an erroneous pathname for the remote system the copy will fail. If the destination-file is a directory, the last part of the source-file name is used. Uucp preserves execute permissions across the transmission and gives 0666 read and write permissions (see chmod(2)). The following options are interpreted by uucp. -d Make all necessary directories for the file copy. -c Use the source file when copying out rather than copying the file to the spool directory. -m Send mail to the requester when the copy is complete. Uulog maintains a summary log of uucp and uux(1) transactions in the file `/usr/spool/uucp/LOGFILE' by gathering information from partial log files named `/usr/spool/uucp/LOG.*.?'. It removes the partial log files. The options cause uulog to print logging information: -ssys Print information about work involving system sys. -uuser Print information about work done for the specified user. FILES
/usr/spool/uucp - spool directory /usr/lib/uucp/* - other data and program files SEE ALSO
uux(1), mail(1) D. A. Nowitz, Uucp Implementation Description WARNING
The domain of remotely accessible files can (and for obvious security reasons, usually should) be severely restricted. You will very likely not be able to fetch files by pathname; ask a responsible person on the remote system to send them to you. For the same reasons you will probably not be able to send files to arbitrary pathnames. BUGS
All files received by uucp will be owned by uucp. The -m option will only work sending files or receiving a single file. (Receiving multiple files specified by special shell characters ?*[] will not activate the -m option.) UUCP(1C)
All times are GMT -4. The time now is 05:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy