Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to deal with incomplete image files Post 302534985 by CinciJeff on Wednesday 29th of June 2011 09:56:02 AM
Old 06-29-2011
How to deal with incomplete image files

Sorry for the odd title, but I couldn't think of an easy way to describe my issue.

Background
I have a home security system that continually sends (via FTP) 4 different still images to a directory on my personal website - cam0.jpg, cam1.jpg, etc. I've written an extremely basic html script to display the images on a single page, and I can access that from anywhere (using a DynDNS address).

Problem
In general the web page works fine, but the problem I have is that one of the images is always in the middle of being overwritten by an updated one. The result is either half an image, a corrupt image or sometimes even an error if I catch the file at just the right spot (maybe as its writing the header or something...)

Question
Is there any way to structure the directory, or some other technique that will "cache" the existing image before it's overwritten? The goal is to have all four images intact each time I enter the web page.

I don't think I have any control over how the security software writes to the FTP site, so maybe I'd need to have some script running that only copies intact files to a secondary directory... I really don't know about this one...

Thanks for any help!

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

append newline to files with incomplete last line

Hi all, Is there any way I can check a file for the linefeed character at the end of the file, and append one only if it is missing (ie. Incomplete last line)? Need to do this because I need to write a script to process files FTP-ed over from various machines, which may or may not be... (1 Reply)
Discussion started by: ziyi
1 Replies

2. Shell Programming and Scripting

Join of files is incomplete?!

Hi folks, I am using the join command to join two files on a common field as follows: File1.txt Adsorption|H01.181.529.047 Adult|M01.060.116 Children|M01.055 File2.txt 5|Adsorption|C0001674 7|Adult|C000001 6|Children|C00002 join -i -t "|" -a 2 -1 1 -2 2 File1.txt File2.txt This... (7 Replies)
Discussion started by: s0460205
7 Replies

3. Shell Programming and Scripting

How to ignore incomplete files

On Solaris & AIX, suppose there is a directory 'dir'. Log files of size approx 1MB are continuously being deposited here by scp command. I have a script that scans this dir every 5 mins and moves away the log files that have been deposited so far. How do I design my script so that I pick up... (6 Replies)
Discussion started by: sentak
6 Replies

4. Solaris

How to ignore incomplete files

On Solaris, suppose there is a directory 'dir'. Log files of size approx 1MB are continuously being deposited here by scp command. I have a script that scans this dir every 5 mins and moves away the log files that have been deposited so far. How do I design my script so that I pick up *only*... (6 Replies)
Discussion started by: sentak
6 Replies

5. Shell Programming and Scripting

How to deal with .tar.gz files in Linux?x

Dear all, there are more than 10 files with .tar.gz extension in my folder i didnt want to extract them i just want to run the query to fetch my necessary data from all the files. but when i run the command it untar the files in that folder. gunzip -c abc.tar.gz | tar -xf - | grep REC |... (0 Replies)
Discussion started by: jojo123
0 Replies

6. Shell Programming and Scripting

How to deal files with space in names?

I have a bash file as following: #!/bin/sh deal_file(){ printf $1 printf "\t is a file" echo } main(){ for file in `find "$1" ` do deal_file $file done } main $1 then I run ./t.sh .,get the following results: (1 Reply)
Discussion started by: 915086731
1 Replies

7. Shell Programming and Scripting

matching image files to create one image

Hi, I have two sets of image files. Both sets have names A to Z but set 1 ends with .cdt.png and set 2 ends with .matrix.png. I want set 1 to match with set 2 if the names match (i.e. A.cdt.png will match with A.matrix.png) and with the convert image tool (program for images), it will merge the... (6 Replies)
Discussion started by: kylle345
6 Replies

8. Shell Programming and Scripting

How to deal with replaced files?

My task is to copy all files from many directories in one. The big problem i encounter is that some files in different directory have the same names. Is they are way to copy the files that have same names in a sub directory ( need to preserve the name of the files unchanged ) I have list with... (6 Replies)
Discussion started by: gogok_bg
6 Replies

9. Shell Programming and Scripting

Exclude incomplete files in ls -rlt

Hi All, I am bit puzzled with this requirement where I need to list the files in a directory. However, files are being continuously written to this folder through FTP. Hence I need to exclude the file which is being written at the time of listing the directory. I thought of using file time... (5 Replies)
Discussion started by: angshuman
5 Replies

10. UNIX for Beginners Questions & Answers

Split Command Generating Incomplete Output Files

Hello All, May i please know how do i ensure my split command would NOT generate incomplete output files like below, the last lines in each file is missing some columns or last line is complete. split -b 50GB File File_ File_aa |551|70210203|xxxxxxx|12/22/2010 20:44:58|11/01/2010... (1 Reply)
Discussion started by: Ariean
1 Replies
Lynkeos(1x)															       Lynkeos(1x)

NAME
Lynkeos - application dedicated to the processing of astronomical (mainly planetary) images taken with a webcam through a telescope. SYNOPSIS
lynkeos.app DESCRIPTION
This manual page describe succintly the aims of the Lynkeos application. How does it work? By stacking the best images, the signal to noise ratio is increased and details lost in the noise of individual images become visible in the resulting image. This software accepts movie sequences or still images, in any image format supported by GNUstep or Ffmpeg library, as input It generates a 16 bits RGB TIFF image as output, to be further processed with some all-purpose image processing application. The steps to process a collection of images are : * collect the movies and/or pictures, * collect calibration (dark and flat fields) movies and/or pictures (optional), * align the images, * select the best images, * stack the selected ones, * process the resulting image. FILES
All configuration are made through the GNUstep ability. SEE ALSO
Official Lynkeos web site. http://lynkeos.sourceforge.net/ You find help and tutorials. Lynkeos-GNU/Linux specific web site. http://christophe.jalady.free.fr/lynkeos/ You find some specific information on the port on GNU/Linux of Lynkeos. AUTHORS
Lynkeos is writting by LAMIAUD Jean-Etienne <j-etienne@users.sourceforge.net>. The GNU/Linux port is made by JALADY Christophe <christophe.jalady@free.fr>. Lynkeos 2005-04-17 Lynkeos(1x)
All times are GMT -4. The time now is 06:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy