The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bytes of character in file user50210 UNIX for Dummies Questions & Answers 1 12-02-2008 02:25 AM
Remove first N bytes and last N bytes from a binary file on AIX. naveendronavall Shell Programming and Scripting 1 05-24-2008 12:06 PM
Coomand to download from HTTP(URL) skm123 UNIX for Advanced & Expert Users 4 08-24-2006 10:56 PM
GCC via Http-Download? cyberbloodgoat UNIX for Dummies Questions & Answers 5 10-09-2001 02:42 AM
Take a file from the system and put on tape and reset the file to 0 bytes JackieRyan26 UNIX for Dummies Questions & Answers 1 09-06-2001 06:08 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-17-2009
learn more's Avatar
learn more learn more is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 10
How to download X bytes from a file using ftp or http?

Hi,

I have a simple ftp shell script which can download the entire file, however I want to know if there is anyway that I can download only the partial content, say X bytes from a file. If so, how I can do it using ftp and http..


Here is my sample script

#!/bin/sh

HOST='xyz.com'
USER='anonymous'
PASSWD='xxxxx'
/usr/bin/ftp -v -n $HOST << _FTP
quote USER $USER
quote PASS $PASSWD
bin
prompt off
cd <dir>
get <remote-filename> <local-filename>
bye

_FTP
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0