Sponsored Content
Top Forums Shell Programming and Scripting How to ignore incomplete files Post 302167466 by drl on Thursday 14th of February 2008 01:29:55 PM
Old 02-14-2008
Hi.

Unless there is a prior agreement between the creating process and the rest of the universe, I don't think there is any method to guarantee that a file is "complete".

I would attempt to address this by having the creating process set some completion flag, create an additional "unlocked-now" file, etc. -- similar to perhaps to what robotronic suggested. You might investigate ownership of the files, placing the files in a holding area until the next one begins to be created and then moving the assumed-to-be-complete file to the transfer directory, writing a wrapper script around the creating process to create the complete signal, and methods along that line.

I'll be interested in additional comments ... cheers, drl
 

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 '.' files

I'm running Fedora Core 6 as an FTP server on a powerMac G4... I'm trying to create a script to remove files older than 3 days... I'm able to find all data older than 3 days but it finds hidden files such as /home/ftp/goossens/.canna /home/ftp/goossens/.kde... (4 Replies)
Discussion started by: James_UK
4 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

Getting ls to ignore ~ and # files

Is there a way to customize ls to ignore files ending with ~ and #? (those are Emacs backup and auto-save files). I found -B option, which only ignores ~ files (2 Replies)
Discussion started by: yaroslavvb
2 Replies

6. UNIX for Dummies Questions & Answers

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... (4 Replies)
Discussion started by: CinciJeff
4 Replies

7. 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

8. Shell Programming and Scripting

Wget - how to ignore files in immediate directory?

i am trying to recursively save a remote FTP server but exclude the files immediately under a directory directory1 wget -r -N ftp://user:pass@hostname/directory1 I want to keep these which may have more files under them directory1/dir1/file.jpg directory1/dir2/file.jpg... (16 Replies)
Discussion started by: vanessafan99
16 Replies

9. Red Hat

Lvcreate snapshot - ignore files

Hi, Need help for the below scenario.. Its a linux os snapshot which has been taken based on taking snapshot using lvcreate..while taking rootvg it taking an dump file of 2GB unnecessarily.. So any tricks to avoid the dump file while creating snapshot using lvcreate (0 Replies)
Discussion started by: ksgnathan
0 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
update-fonts-dir(8)					      System Manager's Manual					       update-fonts-dir(8)

NAME
       update-fonts-dir - compile fonts.dir files

SYNOPSIS
       update-fonts-dir [OPTION] directory ...

DESCRIPTION
       update-fonts-dir creates a fonts.dir file in an X font directory by invoking mkfontdir(1x) with the appropriate arguments.  It is typically
       invoked only from the post-installation and post-removal scripts of a package containing fonts for the X Window System, but may be  invoked
       at  any	time  to  reconstruct  fonts.dir  files.   For	each directory, which is simply the last component of its path (such as '75dpi' or
       'misc'), update-fonts-dir will generate either /usr/lib/X11/fonts/directory/fonts.dir or /usr/share/fonts/X11/directory/fonts.dir from  the
       fonts.scale and font files found within it.

       This  enables  multiple packages to provide names for fonts in the same directory.  No font package actually provides the fonts.dir file in
       the X font directory itself, so there is no danger of overwriting one package's font names with those of another.

       For instance, the two packages  'xfonts-base'  (real)  and  'xfonts-nifty'  (hypothetical)  may	both  install  fonts  into  the  directory
       /usr/lib/X11/fonts/misc,  and  update-fonts-dir	will  ensure that the fonts.dir file in that directory contains information about the font
       files provided by both packages.

       The format of fonts.dir files is described in the mkfontdir(1x) manual page.

       An example of how to use update-fonts-dir in package maintainer scripts is provided in the Debian Policy Manual.

OPTIONS
       -h, --help displays a brief usage message and exits.

       -7, --x11r7-layout switches the font layout to the one introduced in X11R7: fonts in /usr/share/fonts/X11/directory (default is:  fonts	in
       /usr/lib/X11/fonts/directory)

OPERANDS
       update-fonts-dir  takes	one or more X font directory names to operate on as operands.  Only the final path component of the directory name
       should be specified; e.g.,
	      update-fonts-dir 75dpi
       is correct, while 'update-fonts-dir /usr/X11R6/lib/X11/fonts/75dpi' and 'update-fonts-dir /usr/lib/X11/fonts/75dpi' are not.

ENVIRONMENT
       COLUMNS
	      indicates the width of the terminal device in character cells.  This value is used for formatting diagnostic messages.  If not  set,
	      the terminal is queried using stty(1) to determine its width.  If that fails, a value of '80' is assumed.

DIAGNOSTICS
   Errors
       usage error: one or more font directories must be provided
	      update-fonts-dir was invoked without operands.  Supply one or more X font directory names to operate on.

       usage error: unrecognized option
	      update-fonts-dir was invoked with an unrecognized option argument.  Use only the options documented in "OPTIONS", above.

       fatal error: path to X font directory must be used
	      A directory name was supplied that was not an X font directory name.  Supply X font directory names only.

   Warnings
       warning: absolute path directory was provided
	      Usage of absolute paths is deprecated.  Use only the final component of the X font directory name for directory.

       warning: directory does not exist or is not a directory
	      The supplied directory was invalid.  update-fonts-dir skipped it.

EXIT STATUS
       0      update-fonts-dir ran successfully.

       1      update-fonts-dir experienced a fatal error; see the section on diagnostic messages above.

       2      update-fonts-dir was invoked with invalid arguments.

BUGS
       See  the  Debian  Bug  Tracking	System <http://bugs.debian.org/xfonts-utils>.  If you wish to report a bug in update-fonts-dir, please see
       /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.

AUTHOR
       update-fonts-dir was written by Branden Robinson.

SEE ALSO
       mkfontdir(1x)

Debian Project							    2004-11-11						       update-fonts-dir(8)
All times are GMT -4. The time now is 02:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy