1ntfscp(1M) System Administration Commands ntfscp(1M)
2
3
4
6 ntfscp - copy file to an NTFS volume
7
9 ntfscp [options] device source_file destination
10
11
13 The ntfscp utility copies files to an NTFS volume. destination (see
14 Synopis) can be either a file or a directory. If destination is a
15 directory specified by name, source_file is copied into this directory.
16 If destination is a directory specified by inode number, an unnamed
17 data attribute is created for this inode and source_file is copied into
18 it. Consider possible negative consequence before specifying a direc‐
19 tory by inode number: it is unusual to have an unnamed data stream in a
20 directory.
21
22 Data Streams
23 All data on NTFS is stored in streams, which can have names. A file can
24 have more than one data stream, but exactly one must have no name. The
25 size of a file is the size of its unnamed data stream. Usually, when
26 you do not specify a stream name, you are seeking access to the unnamed
27 data stream. If you want access to a named data stream, you need to add
28 :stream_name to the filename. For example, by opening some.mp3:artist
29 you will open stream artist in some.mp3. In an operating system, such
30 as Windows, that prevents you from accessing named data streams, you
31 need to use some program like FAR or utilities from cygwin to access
32 those streams.
33
35 Supported options are listed below. Most options have both single-let‐
36 ter and full-name forms. Multiple single-letter options that do not
37 take an argument can be combined. For example, -fv is the equivalent of
38 -f -v. A full-name option can be abbreviated to a unique prefix of its
39 name.
40
41 -a, --attribute num
42
43 Write to attribute designated by num.
44
45
46 -f, --force
47
48 Overrides some sensible defaults, such as not working with a
49 mounted volume. Use this option with caution.
50
51
52 -h, --help
53
54 Show a list of options with a brief description of each one.
55
56
57 -i, --inode
58
59 Treat destination (see Synopsis) as inode number.
60
61
62 -N, --attr-name name
63
64 Write to attribute with this name.
65
66
67 -n, --no-action
68
69 Use this option to make a test run before doing the actual copy
70 operation. Volume will be opened read-only and no write will be
71 done.
72
73
74 -q, --quiet
75
76 Suppress some debug, warning, and error messages.
77
78
79 -V, --version
80
81 Show the version number, copyright, and license information.
82
83
84 -v, --verbose
85
86 Display more debug, warning, and error messages.
87
88
90 Example 1 Copying from Home to Root Directory
91
92
93 The following command copies new_boot.ini from /home/user as boot.ini
94 to the root of an /dev/dsk/c0d0p1 NTFS volume.
95
96
97 # ntfscp /dev/dsk/c0d0p1 /home/user/new_boot.ini boot.ini
98
99
100
101 Example 2 Copying a Stream
102
103
104 The following command copies myfile to C:eathfile:stream
105 (assume that /dev/dsk/c0d0p1 drive designator is C).
106
107
108 # ntfscp -N stream /dev/dsk/c0d0p1 myfile /some/path
109
110
111
113 See attributes(5) for descriptions of the following attributes:
114
115
116
117
118 ┌─────────────────────────────┬─────────────────────────────┐
119 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
120 ├─────────────────────────────┼─────────────────────────────┤
121 │Availability │SUNWntfsprogs │
122 ├─────────────────────────────┼─────────────────────────────┤
123 │Interface Stability │Uncommitted │
124 └─────────────────────────────┴─────────────────────────────┘
125
127 ntfsresize(1M), ntfsprogs(1M), parted(1M), attributes(5)
128
129
130 http://wiki.linux-ntfs.org
131
133 ntfscp was written by Yura Pakhuchiy, with contributions from Anton
134 Altaparmakov and Hil Liao.
135
136
137
138SunOS 5.11 28 May 2009 ntfscp(1M)