Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<HTML><HEAD><TITLE>Manpage of ECP</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

</HEAD><BODY>

<H1>ECP</H1>

Section: User Contributed Perl Documentation (1)<BR>Updated: 2017-03-16<BR><A HREF="#index">Index</A>

<A HREF="http://confluence.ecmwf.int/display/UDOC/">Return to Main Contents</A><HR>













<A NAME="lbAB"> </A>

<H2>NAME</H2>



ecp - copies files across ECFS domains, including UNIX

<A NAME="lbAC"> </A>

<H2>SYNOPSIS</H2>



<A NAME="ixAAC"></A>

ecp [<I>-n|-e|-o|-u|-t</I>][<I>-p</I>][<I>-b</I>] <I>source1</I> ... <I>target</I>

<P>



ecp [<I>-n|-e|-o|-u|-t</I>][<I>-p</I>][<I>-b</I>] <I>-F sourcelist</I> <I>target</I>

<A NAME="lbAD"> </A>

<H2>DESCRIPTION</H2>



<A NAME="ixAAD"></A>

If there are two or more source files (which may be patterns)

the target must be a directory

into which those source files will then be copied.

<P>



The sources are usually given within the command line (synopsis 1).

But they may alternatively be listed, one per line, in a <I>sourcelist</I> file

(synopsis 2).

<P>



If <I>target</I> does not exist, it will be automatically created

following the same conventions as for <FONT SIZE="-1">UNIX.</FONT>

<P>



There are two significant differences in behaviour from the <FONT SIZE="-1">UNIX </FONT>cp command:

<DL COMPACT>

<DT>*<DD>

it will automatically create missing directories in the target path;

<DT>*<DD>

if the target file already exists, then overwriting needs explicit

consideration: see options '-n', '-e', '-o', '-u', '-t'.

</DL>

<P>



The source files must all be in one domain (that is, either local or in <FONT SIZE="-1">ECFS</FONT>)

and the target must be in a different domain.

<P>



Filename pattern-matching may be used.

In doing so, however, careful thought needs to be exercised concerning

which domain (local or <FONT SIZE="-1">ECFS</FONT>) does the pattern matching,

and therefore what command-line quoting of pattern specifications is needed

to achieve this.

<A NAME="lbAE"> </A>

<H2>OPTIONS</H2>



<A NAME="ixAAE"></A>

Options controlling whether or not to overwrite an existing target file:

<DL COMPACT>

<DT>-n<DD>

<A NAME="ixAAF"></A>

Do not overwrite.

Do not treat as an error condition (return code 0).

Envisage it as ``if the target already exists then don't update''.





<P>





Equivalent to the same flag on Linux cp.

Unlike the Linux command, this is the default behaviour.

<DT>-e<DD>

<A NAME="ixAAG"></A>

Do not overwrite.

Treat as an error condition (return code 1).

Envisage it as ``I expect the target should not yet exist;

if it already exists this is an error''.

<DT>-o<DD>

<A NAME="ixAAH"></A>

Overwrite the existing file.

Envisage it as ``always overwrite'', as would happen with a <FONT SIZE="-1">UNIX </FONT>cp.

<DT>-u<DD>

<A NAME="ixAAI"></A>

Overwrite only if the existing target is older than the requested source.

Do not treat as an error condition (return code 0).

Envisage it as ``if the target is out of date, then update''.





<P>





Equivalent to the same flag on Linux cp.

<DT>-t<DD>

<A NAME="ixAAJ"></A>

Synonym of <I>-u</I> (for backwards compatibility with the earlier client).

</DL>

<P>



Other options:

<DL COMPACT>

<DT>-p<DD>

<A NAME="ixAAK"></A>

The file's timestamps, group and permission will be kept if possible.

Sometimes this may not be possible.

For instance <FONT SIZE="-1">HPSS,</FONT> which undergirds the <FONT SIZE="-1">ECMWF </FONT>'ec' domains,

cannot preserve timestamps on empty (zero-length) files.

<DT>-b<DD>

<A NAME="ixAAL"></A>

Create also a backup copy of the file on the <FONT SIZE="-1">ECMWF</FONT> Disaster Recovery System.

By default, no backup is created.

<DT>--parents<DD>

<A NAME="ixAAM"></A>

Usually when a source pathname is copied to a target directory,

the target file is the leafname of the source path

directly in the target directory.

With <I>--parents</I> the source pathname structure, with its directory tree,

is replicated into the target.  See examples section.

<DT>--dry-run<DD>

<A NAME="ixAAN"></A>

Indicates what the copy would do without actually performing it.

</DL>

<A NAME="lbAF"> </A>

<H2>NOTES</H2>



<A NAME="ixAAO"></A>

When using "<I>-F sourcelist</I>" specify exactly one file (or pattern) per line.

At present leading and trailing space is stripped from each line;

lines starting with '#' are treated as comments and skipped;

empty lines are skipped.

But any future support of such niceties is not guaranteed.

<A NAME="lbAG"> </A>

<H2>EXAMPLES</H2>



<A NAME="ixAAP"></A>

<DL COMPACT>

<DT>ecp foo ec:foo<DD>

<A NAME="ixAAQ"></A>



<DT>ecp foo ec:<DD>

<A NAME="ixAAR"></A>



These two commands are equivalent,

copying the file 'foo' from the local client's current working directory

into file 'foo' in the user's <FONT SIZE="-1">ECFS</FONT> current working directory.

But if the <FONT SIZE="-1">ECFS </FONT>'foo' already exists, the overwrite will not be done,

because of the default '-n' behaviour.

<DT>ecp -o foo ec:foo<DD>

<A NAME="ixAAS"></A>

As per the previous example, except that the overwrite will always happen.

<DT>ecp -t foo ec:foo<DD>

<A NAME="ixAAT"></A>

As per the previous examples, except that the overwrite will be done

only if the source file 'foo' is more recent than the destination 'ec:foo'.

<DT>ecp foo* ec:<DD>

<A NAME="ixAAU"></A>

Copy multiple source files, whose names match the pattern 'foo*', into <FONT SIZE="-1">ECFS.</FONT>

<DT>ecp 'ec:foo*' .<DD>

<A NAME="ixAAV"></A>

Copy multiple local source files, whose names match the pattern 'foo*',

from <FONT SIZE="-1">ECFS</FONT> into the current <FONT SIZE="-1">UNIX</FONT> working directory.

Note the quotation marks around the source specification.

This is to prevent the local shell attempting the pattern matching

of remote files

so that it instead passes the pattern to the <FONT SIZE="-1">ECFS</FONT> domain.

<DT>ecp subdir1/subdir2/foo ec:tgtdir/<DD>

<A NAME="ixAAW"></A>

The target pathname is <TT>"ec:tgtdir/foo"</TT>.

<DT>ecp --parents subdir1/subdir2/foo ec:tgtdir/<DD>

<A NAME="ixAAX"></A>

In contrast to the previous example, by specifying the <I>--parents</I> flag

the target pathname is <TT>"ec:tgtdir/subdir1/subdir2/foo"</TT>.

</DL>

<A NAME="lbAH"> </A>

<H2>SEE ALSO</H2>



<A NAME="ixAAY"></A>

<I><A HREF="http://confluence.ecmwf.int/display/UDOC/ecfs.1">ecfs</A></I>(1), <I><A HREF="http://confluence.ecmwf.int/display/UDOC/cpecp">cp<>ecp</A></I>(1), <I><A HREF="http://confluence.ecmwf.int/display/UDOC/m
vemv">mv<>emv</A></I>(1), <I><A HREF="http://confluence.ecmwf.int/display/UDOC/emv">emv</A></I>(1)

<P>



<HR>

<A NAME="index"> </A><H2>Index</H2>

<DL>

<DT><A HREF="#lbAB">NAME</A><DD>

<DT><A HREF="#lbAC">SYNOPSIS</A><DD>

<DT><A HREF="#lbAD">DESCRIPTION</A><DD>

<DT><A HREF="#lbAE">OPTIONS</A><DD>

<DT><A HREF="#lbAF">NOTES</A><DD>

<DT><A HREF="#lbAG">EXAMPLES</A><DD>

<DT><A HREF="#lbAH">SEE ALSO</A><DD>

</DL>

<HR>

This document was created by

<A HREF="http://github.com/hamano/man2html/">man2html</A>,

using the manual pages.<BR>

Time: 14:51:58 GMT, July 23, 2018

</BODY>

</HTML>

...