man-pages/man8/ntfscp.8.html
2021-03-31 01:06:50 +01:00

176 lines
5.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of NTFSCP</TITLE>
</HEAD><BODY>
<H1>NTFSCP</H1>
Section: Maintenance Commands (8)<BR>Updated: September 2007<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
ntfscp - copy file to an NTFS volume.
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>ntfscp</B> [<I>options</I>] <I>device source_file destination</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>ntfscp</B> will copy file to an NTFS volume. <I>destination</I> can be either
file or directory. In case if <I>destination</I> is directory specified by name
then <I>source_file</I> is copied into this directory, in case if
<I>destination</I> is directory and specified by inode number then unnamed data
attribute is created for this inode and <I>source_file</I> is copied into it
(WARNING: it's unusual to have unnamed data streams in the directories, think
twice before specifying directory by inode number).
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
Below is a summary of all the options that
<B>ntfscp</B>
accepts. Nearly all options have two equivalent names. The short name is
preceded by
<B>-</B>
and the long name is preceded by
<B>--</B>.
Any single letter options, that don't take an argument, can be combined into a
single command, e.g.
<B>-fv</B>
is equivalent to
<B>-f -v</B>.
Long named options can be abbreviated to any unique prefix of their name.
<DL COMPACT>
<DT id="1"><B>-a</B>, <B>--attribute</B> NUM<DD>
Write to this attribute.
<DT id="2"><B>-i</B>, <B>--inode</B><DD>
Treat
<I>destination</I>
as inode number.
<DT id="3"><B>-m</B>, <B>--min-fragments</B><DD>
Minimize fragmentation when allocating space to the attribute. This is
mostly useful when creating big files.
<DT id="4"><B>-N</B>, <B>--attr-name</B> NAME<DD>
Write to attribute with this name.
<DT id="5"><B>-n</B>, <B>--no-action</B><DD>
Use this option to make a test run before doing the real copy operation.
Volume will be opened read-only and no write will be done.
<DT id="6"><B>-f</B>, <B>--force</B><DD>
This will override some sensible defaults, such as not working with a mounted
volume. Use this option with caution.
<DT id="7"><B>-h</B>, <B>--help</B><DD>
Show a list of options with a brief description of each one.
<DT id="8"><B>-q</B>, <B>--quiet</B><DD>
Suppress some debug/warning/error messages.
<DT id="9"><B>-t</B>, <B>--timestamp</B><DD>
Copy the modification time of source_file to destination. This is
not compatible with <B>--attr-name</B> and <B>--attribute</B>.
<DT id="10"><B>-V</B>, <B>--version</B><DD>
Show the version number, copyright and license
<B>ntfscp</B>.
<DT id="11"><B>-v</B>, <B>--verbose</B><DD>
Display more debug/warning/error messages.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>DATA STREAMS</H2>
All data on NTFS is stored in streams, which can have names. A file can have
more than one data streams, but exactly one must have no name. The size of a
file is the size of its unnamed data stream. Usually when you don't specify
stream name you are access to unnamed data stream. If you want access to named
data stream you need to add &quot;:stream_name&quot; to the filename. For example: by
opening &quot;some.mp3:artist&quot; you will open stream &quot;artist&quot; in &quot;some.mp3&quot;. But
windows usually prevent you from accessing to named data streams, so you need
to use some program like FAR or utils from cygwin to access named data streams.
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>
Copy new_boot.ini from /home/user as boot.ini to the root of an /dev/hda1 NTFS
volume:
<DL COMPACT><DT id="12"><DD>
<P>
<B>ntfscp /dev/hda1 /home/user/new_boot.ini boot.ini</B>
<P>
</DL>
Copy myfile to C:\some\path\myfile:stream (assume that /dev/hda1 letter in
windows is C):
<DL COMPACT><DT id="13"><DD>
<P>
<B>ntfscp -N stream /dev/hda1 myfile /some/path</B>
<P>
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
There are no known problems with <B>ntfscp</B>. If you find a bug please send an
email describing the problem to the development team:
<BR>
<A HREF="mailto:ntfs-3g-devel@lists.sf.net">ntfs-3g-devel@lists.sf.net</A>
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
<B>ntfscp</B> was written by Yura Pakhuchiy, with contributions from Anton
Altaparmakov and Hil Liao.
It was ported to ntfs-3g by Erik Larsson.
<A NAME="lbAJ">&nbsp;</A>
<H2>DEDICATION</H2>
With love to Marina Sapego.
<A NAME="lbAK">&nbsp;</A>
<H2>AVAILABILITY</H2>
<B>ntfscp</B>
is part of the
<B>ntfs-3g</B>
package and is available from:
<BR>
<A HREF="http://www.tuxera.com/community/">http://www.tuxera.com/community/</A>
<A NAME="lbAL">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?8+ntfsprogs">ntfsprogs</A></B>(8)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="17"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="18"><A HREF="#lbAF">DATA STREAMS</A><DD>
<DT id="19"><A HREF="#lbAG">EXAMPLES</A><DD>
<DT id="20"><A HREF="#lbAH">BUGS</A><DD>
<DT id="21"><A HREF="#lbAI">AUTHORS</A><DD>
<DT id="22"><A HREF="#lbAJ">DEDICATION</A><DD>
<DT id="23"><A HREF="#lbAK">AVAILABILITY</A><DD>
<DT id="24"><A HREF="#lbAL">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:14 GMT, March 31, 2021
</BODY>
</HTML>