LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-24-2012, 04:11 AM   #1
zobin
LQ Newbie
 
Registered: Dec 2011
Location: China
Posts: 5

Rep: Reputation: 0
Question how to change mode of tftp ,then get file and put file? programming in shell


This is a shell program.I don't know how.
I want to startup tftp,
connect to host,
get file(s) to my directory in binary mode,
...
put file(s) in binary mode
done..
 
Old 02-24-2012, 05:26 AM   #2
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 709

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
Hi.

Welcome to LQ!
Did you searched this forum for similar threads?
Take a look at this for example.
 
Old 02-24-2012, 09:52 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Are you talking about using tftp as a server or a client? The tftp server is normally run as a child of inetd, so isn't actually 'started', per se.
The tftp client, tftp, reads its input from stdin, and so scripts can be crafted and fed to it by redirecting tftp's stdin to the script file.
Code:
#! /bin/bash

# Create a simple script
echo "get pxelinux.0" > tftp_client.scr
# ...   more tftp commands here ...
echo "quit"          >> tftp_client.scr

# Invoke the tftp client, with script as input
tftp 192.168.0.123 < tftp_client.scr
--- rod.
 
1 members found this post helpful.
Old 02-25-2012, 02:31 AM   #4
zobin
LQ Newbie
 
Registered: Dec 2011
Location: China
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you.This is really helpful for me
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the file mode to -rws--s--- ust Linux - Newbie 5 09-16-2011 02:11 AM
Permission denied while trying to put the file using TFTP Rohit_4739 Linux - Newbie 3 01-06-2011 05:22 PM
How to change to root to put file in amsn whiskeyfire Linux - Newbie 5 03-24-2006 08:57 PM
Change file mode juno Linux - General 1 12-05-2002 07:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration