wiki:manuals/dCache_clients/client_gridftp
Last modified 13 years ago Last modified on 11/06/07 12:39:05

Using the GridFTP clients with dCache

D-Cache provides a GSI FTP door, which is in effect a GSI authenticated FTP access point to D-Cache

Listing a directory

To list the content of a D-cache Directory GSI FTP can be used

edg-gridftp-ls gsiftp://dev07.gridpp.rl.ac.uk/pnfs/gridpp.rl.ac.uk/data/dteam/

Checking a file exists

To check the existence of a file with GSI FTP.

edg-gridftp-exists gsiftp://dev07.gridpp.rl.ac.uk/pnfs/gridpp.rl.ac.uk/data/dteam/filler_test20050819130209790873000
echo $?
0
edg-gridftp-exists gsiftp://dev07.gridpp.rl.ac.uk/pnfs/gridpp.rl.ac.uk/data/dteam/filler_test200508191302097908730002
error the server sent an error response: 451 451 /pnfs/gridpp.rl.ac.uk/data/dteam/filler_test200508191302097908730002  not found
echo $?
1

Please note the echo $? show the return code of the last run application. The error message returned from the client this should not be scripted against as its one of many possible errors.

Deleting files

To delete files with GSI FTP use the following command.

edg-gridftp-rm gsiftp://dev01.gridpp.rl.ac.uk/pnfs/gridpp.rl.ac.uk/data/dteam/filler_test20050811160948926780000

Which deletes the file filler_test20050811160948926780000 from the "dteam" VO on the host dev01.gridpp.rl.ac.uk within the domain gridpp.rl.ac.uk.

Copying files

To copy files to and from dCache with the gridftp protocol follows the syntax src destination.

globus-url-copy 
    file://///home/autotest/dcacheTestSuite.20071102160104/tmpfile.clinton.504.22080.20071102160121.4 
    gsiftp://johnson.desy.de/pnfs/desy.de/data/dteam/test_GlobusUrlCopy.clinton.504.22080.20071102160121.2