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. (-f overrides any previous -i or -n options.)
Dramatic moment: -f will nuke the existing destination without asking, so use it with care 😭
  • -i β€” cp writes a prompt to standard error before copying a file that would overwrite an existing one. If the response from standard input begins with y or Y, the copy is attempted. (-i overrides any previous -f or -n options.) πŸ€”
  • -n β€” don't overwrite an existing file. (-n overrides any previous -f or -i options.) πŸ™…β€β™€οΈ
  • -p β€” cp preserves 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 β€” if src_file designates a directory, cp copies the directory and the entire subtree connected at that point. If src_file ends 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. (-f overrides any previous -i or -n options.) πŸ”₯
  • -i β€” mv writes 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. (-i overrides any previous -f or -n options.) πŸ€”
  • -n β€” don't overwrite an existing file. (-n overrides any previous -f or -i options.) πŸ™…β€β™€οΈ
  • -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 ✨

dbd(1), addump(1) πŸ¦‹

✨ 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