how to check the file is arrived


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to check the file is arrived
# 1  
Old 09-18-2012
how to check the file is arrived

Hi I am doing a perl script .
I wanted to check if the files have arrived in the target location for current date.

the files format will be some thing like this .

So for 13-sep-2012 the file will be like this.

Code:
 
 
feedmgr.usfed.t_bills_20120912_20120913173232
feedmgr.usfed.mbs_20120912_20120913173246
feedmgr.usfed.t_notes_and_bonds_20120912_20120913173259
feedmgr.usfed.agencies_20120912_20120913173313
feedmgr.usfed.tips_20120912_20120913173326

if all the files has arrived in the target location for current date then ,it should process the file .else no processing.

please help.
# 2  
Old 09-18-2012
check the test -f option under man page. I am pretty sure u will manage to write a simple script for this by your own...

If you get stuck post your code some one will help you out..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

After Ftp'ing file to destination how to check the file if it is in correct ASCII and not corrupted

Hi Folks, While transferring file from FTP software like Filezilla the files gets corrupted. Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies

2. Shell Programming and Scripting

Script to check for the file existence, if file exists it should echo the no of modified days

Hi, I am looking for a shell script with the following. 1. It should check whether a particular file exists in a location #!/bin/sh if ; then echo "xxx.txt File Exists" else echo "File Not Found" fi 2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies

3. Shell Programming and Scripting

Script check for file, alert if not there, and continue checking until file arrives

All, Is there a way to keep checking for a file over and over again in the same script for an interval of time? Ie If { mail -user continue checking until file arrives file arrives tasks exit I don't want the script to run each time and email the user each time a file... (4 Replies)
Discussion started by: markdjones82
4 Replies

4. Shell Programming and Scripting

How do I know the file is arrived?

I hope you guys can help me . My requirement is as below: Some data files will be ftped by other machine to my machine to the path /home/input As soon as the file is ftped I need to zip it and move the file to /home/zipped path. I can use the below command to zip zip data.zip data.txt ... (6 Replies)
Discussion started by: LinuxLearner
6 Replies

5. Solaris

Before I delete any file in Unix, How can I check no open file handle is pointing to that file?

I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command. I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file. Is there another command that can tell if a file has a truely active... (12 Replies)
Discussion started by: kchinnam
12 Replies

6. UNIX for Advanced & Expert Users

Check EOF char in Unix. OR To check file has been received completely from a remote system

Advance Thanks. (1) I would like to know any unix/Linux command to check EOF char in a file. (2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
Discussion started by: alexalex1
5 Replies

7. Shell Programming and Scripting

How to Check whether list file present in TXT file exist or not

Hi All, I have txt file which has list of files. I have to check whether these files exist or not. Thanks supriya (6 Replies)
Discussion started by: supriyabv
6 Replies

8. Shell Programming and Scripting

Check File Exists and compare to previous day file script

We have data files that are ftp'd every morning to a SUN server. The file names are exactly the same except for that each has the date included in its name. I have to write script to do 2 things: STEP 1) Verify that the file arrived in morning. STEP 2) Compare the file size of the current... (3 Replies)
Discussion started by: rbknisely
3 Replies

9. UNIX for Dummies Questions & Answers

Script to check for a file, check for 2hrs. then quit

I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit. Logically, I'm looking for the best way to approach this Thanks for any assistance in advance. Note: I'm using a C shell and... (2 Replies)
Discussion started by: mmarsh
2 Replies
Login or Register to Ask a Question