AD(1)
β¨ AD(1) π ad π the AppleDouble file utility suite
β¨ NAME β¨
Okay bestie, ad is an AppleDouble file utility suite with Netatalk compatibility π
It's giving toolbox π§°
β¨ SYNOPSIS β¨
ad [ls | cp | mv | rm | set] [...]
ad [-v | --version]
β¨ DESCRIPTION β¨
Okay so, AppleDouble data π (extended attributes of files, ._ files in the same directories, or files in .AppleDouble directories) and the CNID databases get updated as needed when files in a shared Netatalk volume are modified. No cap, it's the glue that keeps everything consistent π«Ά
β¨ Available Commands β¨
List files and directories π
ad ls [-dRl[u]] {file|dir [...]}
Copy files and directories π¦
ad cp [-aipvf] {src_file} {dst_file}
ad cp -R [-aipvf] {src_file|src_directory ...} {dst_directory}
Move files and directories π
ad mv [-finv] {src_file} {dst_file}
ad mv [-finv] {src_file|src_directory ...} {dst_directory}
Remove files and directories ποΈ
ad rm [-Rv] {file|directory}
Set metadata on files π¨
ad set [-t type] [-c creator] [-l label] [-f flags] [-a
attributes] {file}
Show version π
ad -v | --version
β¨ ad ls β¨
List files and directories, but make it cute ππ Here are the options:
-dβ directories get listed as plain files, no fancy treatment π-Rβ lists subdirectories recursively, so you see everything π-lβ long output, which lists the AFP info π-uβ lists the UNIX info π§
Long output description
When you use the long output, each line gives you this whole vibe, in this exact order:
<unixinfo> <FinderFlags> <AFP Attributes> <Color> <Type> <Creator> <CNID from AppleDouble> <name>
FinderFlags (valid for (f)iles and/or (d)irectories) πΈ:
d = On Desktop (f/d)
e = Hidden extension (f/d)
m = Shared (can run multiple times) (f)
n = No INIT resources (f)
i = Inited (f/d)
c = Custom icon (f/d)
t = Stationery (f)
s = Name locked (f/d)
b = Bundle (f/d)
v = Invisible (f/d)
a = Alias file (f/d)
AFP Attributes π:
y = System (f/d)
w = No write (f)
p = Needs backup (f/d)
r = No rename (f/d)
l = No delete (f/d)
o = No copy (f)
Heads up: any letter showing up in uppercase means the flag is set, but it's on a directory where that flag isn't allowed. Wild, I know π
β¨ ad cp β¨
Copy files and directories π¦
In the first synopsis form, cp copies the contents of the src_file to the dst_file. In the second form, the contents of each named src_file gets copied into the destination dst_directory. The names of the files themselves don't change, so they stay themselves π
If cp detects an attempt to copy a file to itself, the copy fails, so don't try it π
When a copy targets an AFP volume, its CNID database daemon gets connected, and every copy goes through the CNID database too. AppleDouble data also gets copied and created as needed when the target is an AFP volume π«Ά
Options:
-aβ archive mode. Same as-Rpβ¨-fβ for each existing destination pathname, it gets removed and a new file gets created, with no confirmation prompt regardless of permissions. (-foverrides any previous-ior-noptions.)
Dramatic moment: -f will nuke the existing destination without asking, so use it with care π
-iβcpwrites a prompt to standard error before copying a file that would overwrite an existing one. If the response from standard input begins withyorY, the copy is attempted. (-ioverrides any previous-for-noptions.) π€-nβ don't overwrite an existing file. (-noverrides any previous-for-ioptions.) π ββοΈ-pβcppreserves these attributes of each source file in the copy: modification time, access time, file flags, file mode, user ID, and group ID, as far as permissions allow. If the user ID and group ID can't be preserved, no error message shows up and the exit value stays the same π§-Rβ ifsrc_filedesignates a directory,cpcopies the directory and the entire subtree connected at that point. Ifsrc_fileends in/, the contents of the directory get copied instead of the directory itself π³-vβ verbose mode, so you see files as they're copied π-xβ file system mount points are not traversed π«
β¨ ad mv β¨
Move files and directories ππ
Files get moved around within an AFP volume, and the CNID database gets updated as needed. If either of these is true, the files get copied and then removed from the source:
- source or destination is not an AFP volume
source AFP volume != destination AFP volume
Options:
-fβ don't prompt for confirmation before overwriting the destination path. (-foverrides any previous-ior-noptions.) π₯-iβmvwrites a prompt to standard error before moving a file that would overwrite an existing one. If the response from standard input begins with'y'or'Y', the move is attempted. (-ioverrides any previous-for-noptions.) π€-nβ don't overwrite an existing file. (-noverrides any previous-for-ioptions.) π ββοΈ-vβ verbose mode, so you see files after they're moved π
β¨ ad rm β¨
Remove files and directories ποΈπ
The rm utility tries to remove the non-directory files you specify on the command line. If the files and directories live on an AFP volume, the matching CNIDs get deleted from the volumes database π§Ή
The options are:
-Rβ tries to remove the file hierarchy rooted in each file argument π²-vβ be verbose when deleting, showing files as they're removed π
β¨ ad set β¨
Set metadata on files π¨π
The set utility alters metadata on files within an AFP volume. The options are:
-t typeβ change a file's four character file type π-c creatorβ change a file's four character creator type π§βπ¨-l labelβ change a file's color label. Check the list below for the available colors π-f flagsβ change a file's Finder flags. Check the list below for the available flags. An uppercase letter sets the flag, and a lowercase letter removes it πͺ-a attributesβ change a file's attributes. Check the list below for the available attributes. An uppercase letter sets the flag, and a lowercase letter removes it π
Flag descriptions
Color Labels π:
none | grey | green | violet | blue | yellow | red | orange
Finder Flags (valid for (f)iles and/or (d)irectories) πΈ:
d = On Desktop (f/d)
e = Hidden extension (f/d)
m = Shared (can run multiple times) (f)
n = No INIT resources (f)
i = Inited (f/d)
c = Custom icon (f/d)
t = Stationery (f)
s = Name locked (f/d)
b = Bundle (f/d)
v = Invisible (f/d)
a = Alias file (f/d)
AFP Attributes π:
y = System (f/d)
w = No write (f)
p = Needs backup (f/d)
r = No rename (f/d)
l = No delete (f/d)
o = No copy (f)
β¨ See also β¨
β¨ Author β¨
Contributors to the Netatalk Project π
Okay bestie, that's the whole ad tea βπ Source: Netatalk 4.2.4 β¨ Manual: AD(1) π Stay iconic, and don't forget your backups π«Άπ
π¦ where this page comes from
- fedora 43: netatalk 5:4.2.4-2.fc43 Β· GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-BSD AND FSFUL AND LicenseRef-Callaway-MIT
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms