1 '\" te
   2 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
   3 .\" Copyright (c) 2002-2006 Szabolcs Szakacsits
   4 .\" Copyright (c) 2002-2005 Anton Altaparmakov
   5 .\" Copyright (c) 2002-2003 Richard Russon
   6 .\" Copyright (c) 2007 Yura Pakhuchiy
   7 .\" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License, or (at your option) any later version.  This program is distributed
   8 .\" in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program
   9 .\" (in the main directory of the Linux-NTFS distribution in the file COPYING);  if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 11-1307 USA
  10 .TH NTFSCP 1M "May 28, 2009"
  11 .SH NAME
  12 ntfscp \- copy file to an NTFS volume
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 \fBntfscp\fR  [\fIoptions\fR] \fIdevice\fR \fIsource_file\fR \fIdestination\fR
  17 .fi
  18 
  19 .SH DESCRIPTION
  20 .sp
  21 .LP
  22 The \fBntfscp\fR utility copies files to an NTFS volume. \fIdestination\fR (see
  23 Synopis) can be either a file or a directory. If \fIdestination\fR is a
  24 directory specified by name, \fIsource_file\fR is copied into this directory.
  25 If \fIdestination\fR is a directory specified by inode number, an unnamed data
  26 attribute is created for this inode and \fIsource_file\fR is copied into it.
  27 Consider  possible negative consequence before specifying a directory by inode
  28 number: it is unusual to have an unnamed data stream in a directory.
  29 .SS "Data Streams"
  30 .sp
  31 .LP
  32 All data on NTFS is stored in streams, which can have names. A file can have
  33 more than one data stream, but exactly one must have no name. The size of a
  34 file is the size of its unnamed data stream. Usually, when you do not specify a
  35 stream name, you are seeking access to the unnamed data stream. If you want
  36 access to a named data stream, you need to add \fB:\fR\fIstream_name\fR to the
  37 filename. For example, by opening \fBsome.mp3:artist\fR you will open stream
  38 \fBartist\fR in \fBsome.mp3\fR. In an operating system, such as Windows, that
  39 prevents you from accessing named data streams, you need to use some program
  40 like \fBFAR\fR or utilities from \fBcygwin\fR to access those streams.
  41 .SH OPTIONS
  42 .sp
  43 .LP
  44 Supported options are listed below. Most options have both single-letter and
  45 full-name forms. Multiple single-letter options that do not take an argument
  46 can be combined. For example, \fB-fv\fR is the equivalent of \fB-f\fR \fB-v\fR.
  47 A full-name option can be abbreviated to a unique prefix of its name.
  48 .sp
  49 .ne 2
  50 .na
  51 \fB\fB-a\fR, \fB--attribute\fR \fInum\fR\fR
  52 .ad
  53 .sp .6
  54 .RS 4n
  55 Write to attribute designated by \fInum\fR.
  56 .RE
  57 
  58 .sp
  59 .ne 2
  60 .na
  61 \fB\fB-f\fR, \fB--force\fR\fR
  62 .ad
  63 .sp .6
  64 .RS 4n
  65 Overrides some sensible defaults, such as not working with a mounted volume.
  66 Use this option with caution.
  67 .RE
  68 
  69 .sp
  70 .ne 2
  71 .na
  72 \fB\fB-h\fR, \fB--help\fR\fR
  73 .ad
  74 .sp .6
  75 .RS 4n
  76 Show a list of options with a brief description of each one.
  77 .RE
  78 
  79 .sp
  80 .ne 2
  81 .na
  82 \fB\fB-i\fR, \fB--inode\fR\fR
  83 .ad
  84 .sp .6
  85 .RS 4n
  86 Treat \fIdestination\fR (see Synopsis) as inode number.
  87 .RE
  88 
  89 .sp
  90 .ne 2
  91 .na
  92 \fB\fB-N\fR, \fB--attr-name\fR \fIname\fR\fR
  93 .ad
  94 .sp .6
  95 .RS 4n
  96 Write to attribute with this name.
  97 .RE
  98 
  99 .sp
 100 .ne 2
 101 .na
 102 \fB\fB-n\fR, \fB--no-action\fR\fR
 103 .ad
 104 .sp .6
 105 .RS 4n
 106 Use this option to make a test run before doing the actual copy operation.
 107 Volume will be opened read-only and no write will be done.
 108 .RE
 109 
 110 .sp
 111 .ne 2
 112 .na
 113 \fB\fB-q\fR, \fB--quiet\fR\fR
 114 .ad
 115 .sp .6
 116 .RS 4n
 117 Suppress some debug, warning, and error messages.
 118 .RE
 119 
 120 .sp
 121 .ne 2
 122 .na
 123 \fB\fB-V\fR, \fB--version\fR\fR
 124 .ad
 125 .sp .6
 126 .RS 4n
 127 Show the version number, copyright, and license information.
 128 .RE
 129 
 130 .sp
 131 .ne 2
 132 .na
 133 \fB\fB-v\fR, \fB--verbose\fR\fR
 134 .ad
 135 .sp .6
 136 .RS 4n
 137 Display more debug, warning, and error messages.
 138 .RE
 139 
 140 .SH EXAMPLES
 141 .LP
 142 \fBExample 1 \fRCopying from Home to Root Directory
 143 .sp
 144 .LP
 145 The following command copies \fBnew_boot.ini\fR from \fB/home/user\fR as
 146 \fBboot.ini\fR to the root of an \fB/dev/dsk/c0d0p1\fR NTFS volume.
 147 
 148 .sp
 149 .in +2
 150 .nf
 151 # \fBntfscp /dev/dsk/c0d0p1 /home/user/new_boot.ini boot.ini\fR
 152 .fi
 153 .in -2
 154 .sp
 155 
 156 .LP
 157 \fBExample 2 \fRCopying a Stream
 158 .sp
 159 .LP
 160 The following command copies \fBmyfile\fR to \fBC:\some\path\myfile:stream\fR
 161 (assume that \fB/dev/dsk/c0d0p1\fR drive designator is \fBC\fR).
 162 
 163 .sp
 164 .in +2
 165 .nf
 166 # \fBntfscp -N stream /dev/dsk/c0d0p1 myfile /some/path\fR
 167 .fi
 168 .in -2
 169 .sp
 170 
 171 .SH ATTRIBUTES
 172 .sp
 173 .LP
 174 See \fBattributes\fR(5) for descriptions of the following attributes:
 175 .sp
 176 
 177 .sp
 178 .TS
 179 box;
 180 c | c
 181 l | l .
 182 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 183 _
 184 Interface Stability     Uncommitted
 185 .TE
 186 
 187 .SH SEE ALSO
 188 .sp
 189 .LP
 190 \fBntfsresize\fR(1M), \fBntfsprogs\fR(1M), \fBparted\fR(1M),
 191 \fBattributes\fR(5)
 192 .sp
 193 .LP
 194 http://wiki.linux-ntfs.org
 195 .SH AUTHORS
 196 .sp
 197 .LP
 198 \fBntfscp\fR was written by Yura Pakhuchiy, with contributions from Anton
 199 Altaparmakov and Hil Liao.