beautypg.com

2 moving files – Sun Microsystems MEDIACENTER 2.1 User Manual

Page 103

background image

Chapter 6

Sun MediaCenter Server FTP Daemon

6-9

Examples of

mls

use:

6.3.2

Moving Files

When copying a data file (that is, an MPEG file), as distinguished from an index file,
within

ftp

, use the

bin

command to put

ftp

in binary mode. Index files are ASCII

files, so you can use ASCII mode,

ftp

’s default mode, for their transfer. When

copying both data and index files, as you might with

mput

and

mget

, use

ftp

’s

binary mode.

The multiple-copy commands,

mput

and

mget

, work as they do in their standard

forms. If you invoke

ftp

with the

-i

option, you are prompted (

mget

or

mget

?

) for each file copied. If you invoke

ftp

without

-i

,

ftp

copies multiple files,

one following the other, without intervening prompts.

For all commands described here, you must specify the name (

title=

) attribute.

For

get

and

mget

, you must specify, in addition to

name

,

speed

and

type

. We

recommend that you also specify

rate

and

format

, so that those values are

available if need to copy the video file back to a Sun MediaCenter server.

ftp> mls smc:title=batman smc:title=seahunt -

200 PORT command successful.

150 ASCII data connection for smc:title=batman (129.144.90.32,56451).

smc:title=batman,format=MPEGTS,speed=10000,type=index

smc:title=batman,format=MPEGTS,speed=10000,type=date,rate=3000000

226 ASCII Transfer complete.

remote: smc:title=batman

242 bytes received in 0.045 seconds (5.2 Kbytes/s)

200 PORT command successful.

150 ASCII data connection for smc:title=seahunt (129.144.90.32,56585).

smc:title=seahunt,format=MPEGTS,speed=1000,type=data,rate=4000000

smc:title=seahunt,format=MPEGTS,speed=12000,type=data,rate=4000000

smc:title=seahunt,format=MPEGTS,speed=-12000,type=data,rate=4000000

226 ASCII Transfer complete.

remote: smc:title=seahunt

192 bytes received in 0.048 seconds (3.9 Kbytes/s)

ftp> mls smc:title=batman title=seahunt /tmp/mls_out

output to local-file: /tmp/mls_out? y

(or carriage return)

200 PORT command successful.

150 ASCII data connection for /bin/ls (129.144.90.32,56735).

226 ASCII Transfer complete.

local: /tmp/mls_out remote: title=batman title=seahunt

238 bytes received in 0.021 seconds (1.8 Kbytes/s)

ftp>