blob: bf5127baecf0119c38722ffb36e568e2b1f152d9 [file] [log] [blame]
Steve Kondik2111ad72013-07-07 12:07:44 -07001.\" Copyright (c) 2004\-2007 Yura Pakhuchiy.
2.\" Copyright (c) 2005 Richard Russon.
3.\" This file may be copied under the terms of the GNU Public License.
4.\"
5.TH NTFSCP 8 "September 2007" "ntfs-3g @VERSION@"
6.SH NAME
7ntfscp \- copy file to an NTFS volume.
8.SH SYNOPSIS
9\fBntfscp\fR [\fIoptions\fR] \fIdevice source_file destination\fR
10.SH DESCRIPTION
11\fBntfscp\fR will copy file to an NTFS volume. \fIdestination\fR can be either
12file or directory. In case if \fIdestination\fR is directory specified by name
13then \fIsource_file\fR is copied into this directory, in case if
14\fIdestination\fR is directory and specified by inode number then unnamed data
15attribute is created for this inode and \fIsource_file\fR is copied into it
16(WARNING: it's unusual to have unnamed data streams in the directories, think
17twice before specifying directory by inode number).
18.SH OPTIONS
19Below is a summary of all the options that
20.B ntfscp
21accepts. Nearly all options have two equivalent names. The short name is
22preceded by
23.B \-
24and the long name is preceded by
25.BR \-\- .
26Any single letter options, that don't take an argument, can be combined into a
27single command, e.g.
28.B \-fv
29is equivalent to
30.BR "\-f \-v" .
31Long named options can be abbreviated to any unique prefix of their name.
32.TP
33\fB\-a\fR, \fB\-\-attribute\fR NUM
34Write to this attribute.
35.TP
36\fB\-i\fR, \fB\-\-inode\fR
37Treat
38.I destination
39as inode number.
40.TP
Steve Kondik79165c32015-11-09 19:43:00 -080041\fB\-m\fR, \fB\-\-min-fragments\fR
42Minimize fragmentation when allocating space to the attribute. This is
43mostly useful when creating big files.
44.TP
Steve Kondik2111ad72013-07-07 12:07:44 -070045\fB\-N\fR, \fB\-\-attr\-name\fR NAME
46Write to attribute with this name.
47.TP
48\fB\-n\fR, \fB\-\-no\-action\fR
49Use this option to make a test run before doing the real copy operation.
50Volume will be opened read\-only and no write will be done.
51.TP
52\fB\-f\fR, \fB\-\-force\fR
53This will override some sensible defaults, such as not working with a mounted
54volume. Use this option with caution.
55.TP
56\fB\-h\fR, \fB\-\-help\fR
57Show a list of options with a brief description of each one.
58.TP
59\fB\-q\fR, \fB\-\-quiet\fR
60Suppress some debug/warning/error messages.
61.TP
62\fB\-V\fR, \fB\-\-version\fR
63Show the version number, copyright and license
64.BR ntfscp .
65.TP
66\fB\-v\fR, \fB\-\-verbose\fR
67Display more debug/warning/error messages.
68.SH DATA STREAMS
69All data on NTFS is stored in streams, which can have names. A file can have
70more than one data streams, but exactly one must have no name. The size of a
71file is the size of its unnamed data stream. Usually when you don't specify
72stream name you are access to unnamed data stream. If you want access to named
73data stream you need to add ":stream_name" to the filename. For example: by
74opening "some.mp3:artist" you will open stream "artist" in "some.mp3". But
75windows usually prevent you from accessing to named data streams, so you need
76to use some program like FAR or utils from cygwin to access named data streams.
77.SH EXAMPLES
78Copy new_boot.ini from /home/user as boot.ini to the root of an /dev/hda1 NTFS
79volume:
80.RS
81.sp
82.B ntfscp /dev/hda1 /home/user/new_boot.ini boot.ini
83.sp
84.RE
85Copy myfile to C:\\some\\path\\myfile:stream (assume that /dev/hda1 letter in
86windows is C):
87.RS
88.sp
89.B ntfscp \-N stream /dev/hda1 myfile /some/path
90.sp
91.RE
92.SH BUGS
93There are no known problems with \fBntfscp\fR. If you find a bug please send an
94email describing the problem to the development team:
95.br
96.nh
97ntfs\-3g\-devel@lists.sf.net
98.hy
99.SH AUTHORS
100\fBntfscp\fR was written by Yura Pakhuchiy, with contributions from Anton
101Altaparmakov and Hil Liao.
102It was ported to ntfs-3g by Erik Larsson.
103.SH DEDICATION
104With love to Marina Sapego.
105.SH AVAILABILITY
106.B ntfscp
107is part of the
108.B ntfs-3g
109package and is available from:
110.br
111.nh
112http://www.tuxera.com/community/
113.hy
114.SH SEE ALSO
115.BR ntfsprogs (8)