1 <?xml version="1.0" encoding="UTF-8"?>
4 <refentrytitle>ad</refentrytitle>
6 <manvolnum>1</manvolnum>
8 <refmiscinfo class="date">02 Sep 2011</refmiscinfo>
10 <refmiscinfo class="source">:NETATALK_VERSION:</refmiscinfo>
16 <refpurpose>Netatalk compatible UNIX file utility suite.</refpurpose>
23 <arg choice="req">ls | cp | mv | rm</arg>
31 <arg choice="req">-v | --version</arg>
36 <title>Description</title>
38 <para><command>ad</command> is a UNIX file utility suite with Netatalk
39 compatibility. AppleDouble<indexterm>
40 <primary>AppleDouble</primary>
41 </indexterm> files in <filename>.AppleDouble</filename> directories and
42 the CNID databases are updated as appropriate.</para>
46 <title>Available Commands</title>
49 <command>ad ls</command>
51 <arg>-dRl<arg>u</arg></arg>
53 <arg choice="req">file|dir <arg>...</arg></arg>
56 <para>List files and directories.</para>
59 <command>ad cp</command>
61 <arg choice="opt">-aipvf</arg>
63 <arg choice="req">src_file</arg>
65 <arg choice="req">dst_file</arg>
69 <command>ad cp -R</command>
71 <arg choice="opt">-aipvf</arg>
73 <arg choice="req">src_file|src_directory ...</arg>
75 <arg choice="req">dst_directory</arg>
78 <para>Copy files and directories.</para>
81 <command>ad mv</command>
83 <arg choice="opt">-finv</arg>
85 <arg choice="req">src_file</arg>
87 <arg choice="req">dst_file</arg>
91 <command>ad mv</command>
93 <arg choice="opt">-finv</arg>
95 <arg choice="req">src_file|src_directory ...</arg>
97 <arg choice="req">dst_directory</arg>
100 <para>Move files and directories.</para>
103 <command>ad rm</command>
105 <arg choice="opt">-Rv</arg>
107 <arg choice="req">file|directory</arg>
111 <command>ad -v|--version</command>
114 <para>Show version.</para>
120 <para>List files and directories. Options:</para>
127 <para>Directories are listed as plain files</para>
135 <para>list subdirectories recursively</para>
143 <para>Long output, list AFP info</para>
151 <para>List UNIX info</para>
156 <para><emphasis>Long output description</emphasis></para>
158 <programlisting><unixinfo> <FinderFlags> <AFP Attributes> <Color> <Type> <Creator> <CNID from AppleDouble> <name>
160 FinderFlags (valid for (f)iles and/or (d)irectories):
163 e = Hidden extension (f/d)
164 m = Shared (can run multiple times) (f)
165 n = No INIT resources (f)
167 c = Custom icon (f/d)
169 s = Name locked (f/d)
178 p = Needs backup (f/d)
183 Note: any letter appearing in uppercase means the flag is set but it's a directory for which the flag is not allowed.</programlisting>
189 <para>Copy files and directories.</para>
191 <para>In the first synopsis form, the cp utility copies the contents of
192 the source_file to the target_file. In the second synopsis form, the
193 contents of each named source_file is copied to the destination
194 target_directory. The names of the files themselves are not changed. If cp
195 detects an attempt to copy a file to itself, the copy will fail.</para>
197 <para>Netatalk AFP volumes are detected by means of their ".AppleDesktop"
198 directory which is located in their volume root. When a copy targeting an
199 AFP volume is detected, its CNID database daemon is connected and all
200 copies will also go through the CNID database. AppleDouble files are also
201 copied and created as needed when the target is an AFP volume.</para>
203 <para>Options:</para>
210 <para>Archive mode. Same as -Rp.</para>
218 <para>For each existing destination pathname, remove it and create a
219 new file, without prompting for confirmation regardless of its
220 permis- sions. (The -f option overrides any previous -i or -n
229 <para>Cause cp to write a prompt to the standard error output before
230 copying a file that would overwrite an existing file. If the
231 response from the standard input begins with the character 'y' or
232 'Y', the file copy is attempted. (The -i option overrides any pre-
233 vious -f or -n options.)</para>
241 <para>Do not overwrite an existing file. (The -n option overrides
242 any previous -f or -i options.)</para>
250 <para>Cause cp to preserve the following attributes of each source
251 file in the copy: modification time, access time, file flags, file
252 mode, user ID, and group ID, as allowed by permissions. If the user
253 ID and group ID cannot be preserved, no error message is displayed
254 and the exit value is not altered.</para>
262 <para>If source_file designates a directory, cp copies the directory
263 and the entire subtree connected at that point.If the source_file
264 ends in a /, the contents of the directory are copied rather than
265 the directory itself.</para>
273 <para>Cause cp to be verbose, showing files as they are
282 <para>File system mount points are not traversed.</para>
291 <para>Move files and directories.</para>
293 <para>Move files around within an AFP volume, updating the CNID database
294 as needed. If either:<itemizedlist>
296 <para>source or destination is not an AFP volume</para>
300 <para>source AFP volume != destination AFP volume</para>
302 </itemizedlist>the files are copied and removed from the source.</para>
304 <para>Options:</para>
311 <para>Do not prompt for confirmation before overwriting the
312 destination path. (The -f option overrides any previous -i or -n
321 <para>Cause mv to write a prompt to standard error before moving a
322 file that would overwrite an existing file. If the response from the
323 standard input begins with the character `y' or `Y', the move is
324 attempted. (The -i option overrides any previous -f or -n
333 <para>Do not overwrite an existing file. (The -n option overrides
334 any previous -f or -i options.)</para>
342 <para>Cause mv to be verbose, showing files after they are
352 <para>Remove files and directories.</para>
354 <para>The rm utility attempts to remove the non-directory type files
355 specified on the command line. If the files and directories reside on an
356 AFP volume, the corresponding CNIDs are deleted from the volumes
359 <para>The options are as follows:</para>
366 <para>Attempt to remove the file hierarchy rooted in each file
375 <para>Be verbose when deleting files, showing them as they are
383 <title>Reporting Bugs</title>
385 <para>Report bugs to the Netatalk-devel list
386 <netatalk-devel@lists.sourceforge.net>.</para>
390 <title>See also</title>
393 <refentrytitle>dbd</refentrytitle>
395 <manvolnum>1</manvolnum>
396 </citerefentry>, <citerefentry>
397 <refentrytitle>apple_dump</refentrytitle>
399 <manvolnum>1</manvolnum>
400 </citerefentry>.</para>