Transfer files with web based form by date


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Transfer files with web based form by date
# 1  
Old 06-17-2009
Transfer files with web based form by date

Not sure how I should approach this one.

I have server X and Server Y. X is a collector. All files are seperated by hour. Y is used strictly for analysis. I do not always need all files from X. Sometimes other people use Y for analysis and do not always know how to transfer the files from X.

How would you set up a web based form so someone could pick a date and transfer all files required from server X to Y?

I currently use scp for transfer from command line.

Thanks
# 2  
Old 06-18-2009
What does this mean?
Quote:
All files are seperated by hour
Amd for this...
Quote:
could pick a date
do you mean hour and date? Do you want ONLY these files? Newer files, older files?
# 3  
Old 06-18-2009
Quote:
Originally Posted by otheus
What does this mean?

Amd for this...
do you mean hour and date? Do you want ONLY these files? Newer files, older files?
A new file is created every hour.

I would like files based on the date chosen.

Example, I was all files from 5am June 1 to 5am June 2. That would be 24 files.
# 4  
Old 06-18-2009
Well, the find tool has the "-ctime" option which would help you. You would calculate how many hours from right now the file was created. That might be a bit tricky, but assuming you have PHP at your disposal, calculating that is rather trivial. Then you would issue a command to find such as:
Code:
find /path/to/files -type f -ctime -$START -ctime +$END -print

Send the output (via a pipe) to a shell script like this:
Code:
#!/bin/bash
scp "$@" user@remote.host:/target/dir

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to use cURL to download web page with authentification (form)?

Hello, I'm new in the forum and really beginer, and also sorry form my bad english. I use linux and want to create little program to download automaticaly some pdf (invoices) and put in a folder of my computer. I learn how to do and programme with ubuntu but the program will be implemented... (1 Reply)
Discussion started by: MarcelOrMittal
1 Replies

2. UNIX for Dummies Questions & Answers

Find the count of files by last created date based on the given date range

My unix version is IBM AIX Version 6.1 I tried google my requirement and found the below answer, find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20" But newer command is not working in AIX version 6.1 unix I have given my requirement below: Input: atr files: ... (1 Reply)
Discussion started by: yuvaa27
1 Replies

3. Solaris

Java web console Vs Web-Based Enterprise Management(WBEM)

Java web console Vs Web-Based Enterprise Management(WBEM) 1. I like to understand the difference in purpose of using java web console and Web-Based Enterprise Management (WBEM) 2. As per CIS benchmark, both of them has to be disabled when not used for increased security. Solaris admin(s) -... (0 Replies)
Discussion started by: cyberidude
0 Replies

4. Shell Programming and Scripting

transfer files to amazon s3 based on counterfile

This is my first attempt at a shell script, and honestly I'm not even sure if its a shell or a bash. Don't penalise me too much, I'm learning and I'm going at a slow pace. Below is my effort at a shell script that transfers files using another perl module written by a much talented author,... (2 Replies)
Discussion started by: 3xad3u5
2 Replies

5. Shell Programming and Scripting

Pass values from web form to shell script

Hi, is it possible to pass more values from web form like textbox to shell script and if yes,how to do that.:confused::confused::confused: (2 Replies)
Discussion started by: tdev457
2 Replies

6. Programming

Creating a web based id request form

Please pardon my ignorance, but I need to create a web-based form which can be used to request access to the unix servers in our environment. It just needs to have input fields for basic info (name, dept., etc.), and perhaps a drop-down box with the names of the servers. The form will be submitted... (2 Replies)
Discussion started by: wjssj
2 Replies

7. Shell Programming and Scripting

Filling out Web Form from Script

I am trying to fill out a web form from within a script I am writing. I think that I should be using curl to do this, but I'm not really sure. The form has username and password fields and a submit button. I want to be able to log in from the command line. Html from the site: <h5... (2 Replies)
Discussion started by: vockleya
2 Replies

8. Shell Programming and Scripting

Want to mv files form one folder to another by date

Hi All Looking for some help here I want to query a file and mv all files that are older than seven days to an archive folder. the archive folder already exists but I am having trouble with the date comparison. list file is as follows eg dd2302071334.txt dd2302071358.txt... (7 Replies)
Discussion started by: SummitElse
7 Replies
Login or Register to Ask a Question