09-01-2010
To check wheather a file is downloaded completely or not
I will have two files (which were in .txt format) ftp'ed to a specified directory, from where my ksh picks up each file at a time and starts processing it. So i need to write a script which as soon as find a file should check wheather it is download completely or not. If it is still downloading then it should wait till the file downloads completely, once it is downloaded completely then it should go to next step. Any help is greatly appreciated.
Thank you
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Let me start by saying I am at a VERY beginner level in terms of UNIX/FTP/etc.
Someone loaded a file onto a server for me and zipped it using gzip.
I accidentally downloaded the file without using "binary".
I now have a "filename.txt.gz" sitting on my computer that I need
to unzip. Is... (2 Replies)
Discussion started by: UDcc123
2 Replies
2. Linux
My system bench mark results
INDEX VALUES
TEST BASELINE RESULT INDEX
Arithmetic Test (type = double) 2541.7 876123.7 344.7
Dhrystone 2 without register variables 22366.3 5411602.3 ... (1 Reply)
Discussion started by: chandra s
1 Replies
3. UNIX for Advanced & Expert Users
Hi,
We have some clients who will place huge files in to one of the remote server.
And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients.
My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies
4. UNIX for Advanced & Expert Users
Hi All,
I'm developing a FTP script as below:
ftp -v -n <IP_ADDRESS> << EOF
user avery jSqaqUU2
lcd /directory/folder/
ascii
prompt
mget *
bye
EOF
I would like to enhance the script to count the total file downloaded. For example, once the script run i want the message "Total <n>... (1 Reply)
Discussion started by: cas553
1 Replies
5. Shell Programming and Scripting
I need to write a script which checks for files loaded into a folder (files are loaded by ftp from other server) and process the file only if the file is loaded completely.
if the file is not complete in the current run, it must be processed in the next run.
Any suggestions would be welcome... (2 Replies)
Discussion started by: kalyan381
2 Replies
6. UNIX for Advanced & Expert Users
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. UNIX for Advanced & Expert Users
I want to create a script to check if a file was downloaded into a folder. if it was i dont want to re-download it.
The requirement is as follows.
The first time the file (filename: A) is downloaded, it is renamed by stripping off part of the filename to filename A22.
The second time an... (1 Reply)
Discussion started by: wizardofoz
1 Replies
8. Programming
I need to
"Ensure that when you download libchat.a from the VLE you have copied it to the same folder on ius as your source files. You then refer to the library (and the libraries it needs) with:
gcc -o outputfile sourcefile.c -L. -lchat -lsocket -lnsl"
But I have no idea what this means! (I... (2 Replies)
Discussion started by: fakuse
2 Replies
9. Shell Programming and Scripting
I have around 100 html files and in each html file I have 5-6 such paragraphs of a company and I need to extract the Name of the company from either the one after "title" or "/company" and then the number of employees and finally the location .
<div class="search_result">
<div... (1 Reply)
Discussion started by: gubbu
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Recently we migrated an application in HP UX to Linux. The files(scripts & logs)download from HP UX coming in a formatted way in MS notepad. However the files in Linux are not in correct format in MS notepad(No spaces , some spl symbols like square).We tried both ASCII and binary but no... (2 Replies)
Discussion started by: nag_sathi
2 Replies
zsync(1) File Transfer zsync(1)
NAME
zsync - Partial/differential file download client over HTTP
SYNTAX
zsync [ -u url ] [ -i inputfile ] [ -o outputfile ] [ { -s | -q } ] [ -k file.zsync ] [ -A hostname=username:password ] { filename | url }
zsync -V
DESCRIPTION
Downloads a file over HTTP. zsync uses a control file to determine whether any blocks in the file are already known to the downloader, and
only downloads the new blocks.
Either a filename or a URL can be given on the command line - this is the path of the control file for the download, which normally has the
name of the actual file to downlaod with .zsync appended. (To create this .zsync file you have to have a copy of the target file, so this
file should be generated by the person providing the download).
zsync downloads to your current directory. It looks for any file in the directory of the same name as the file to download. If it finds
one, it assumes that this is an earlier or incomplete version of the new file to download, and scans this file for any blocks that it can
use to build the target file. (It also looks for a file of the same name with .part appended, so it will automatically find previously
interrupted zsync downloads and reuse the data already downloaded. If you know that the local file to use as input has a different name,
you must use -i)
zsync retrieves the rest of the target file over HTTP. Once the download is finished, the old version (if the new file wants the same name)
is moved aside (a .zs-old extension is appended). The modification time of the file is set to be the same as the remote source file (if
specified in the .zsync).
OPTIONS
-A hostname=username:password
Specifies a username and password to be used with the given hostname. -A can be used multiple times (with different hostnames), in
cases where e.g. the
.zsync file is on a different server from the download, or there are multiple download servers (there could be different auth
details for different servers - and zsync never assumes that your password should be sent to a server other than the one named -
otherwise redirects would be dangerous!).
-i inputfile
Specifies (extra) input files. inputfile is scanned to identify blocks in common with the target file and zsync uses any blocks
found. Can be used multiple times.
-k file.zsync
Indicates that zsync should save the zsync file that it downloads, with the given filename. If that file already exists, then zsync
will make a conditional request to the web server, such that it will only download it again if the server's copy is newer. zsync
will append .part to the filename for storing it while it is downloading, and will only overwrite the main file once the download is
done - and if the download is interrupted, it will resume using the data in the .part file.
-o outputfile
Override the default output file name.
-q Suppress the progress bar, download rate and ETA display.
-s Deprecated synonym for -q.
-u url This specifies the referring URL. If you have a .zsync file locally (if you downloaded it separately, with wget, say) and the
.zsync file contains a relative URL, you need to specify where you got the .zsync file from so that zsync knows which server and
path to use for the rest of the download (this is analogous to adding a <base href="..."> to a downloaded web page to make the links
work).
-V Prints the version of zsync.
FILES
ENVIRONMENT VARIABLES
http_proxy
Should be the [http://]hostname:port for your web proxy, if one is required to access the target web server(s).
EXAMPLES
zsync -i /var/lib/apt/lists/server.debian.org_debian_dists_etch_main_binary-i386_Packages http://zsync.moria.org.uk/s/etch/Packages.zsync
AUTHORS
Colin Phipps <cph@moria.org.uk>
SEE ALSO
zsyncmake(1)
Colin Phipps 0.6.2 zsync(1)