AFS-UP(1)

πŸ’– AFS-UP(1) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about up, from the AFS Command Reference πŸ’… this one's a baddie.


✨ NAME ✨

up β€” recursively copy directories while preserving AFS metadata. it's giving "cp but make it AFS-aware" πŸ¦‹


🌸 SYNOPSIS 🌸

up [-v] [-1] [-f] [-r] [-x] [-m]
    <source directory> <destination directory>

πŸ‘‘ DESCRIPTION πŸ‘‘

So up recursively copies the files and subdirectories from a source directory you name into a destination directory you also name. cute, right? but the command interpreter is not just dumb-copying β€” it also messes with the destination directory and everything inside it in these exact ways:

  • It copies the source directory's access control list (ACL) onto the destination directory and its subdirectories, straight-up overwriting any ACLs that were already vibing there. no mercy 😀
  • If the issuer is logged on as the local superuser root and has AFS tokens as a member of the group system:administrators, then the source directory's owner (as reported by the ls -ld command) becomes the owner of the destination directory plus all the files and subdirectories in it. Otherwise? the issuer's user name gets recorded as the owner. that's it, that's the rule πŸ’β€β™€οΈ
  • If a file or directory exists in both the source and destination directories, the source version overwrites the destination version. BUT β€” and this is the important part β€” that overwrite fails if the first (user) w (write) mode bit is turned off on the version in the destination directory, unless you pass the -f flag. so if you're getting errors, check your mode bits, bestie 😭
  • The modification timestamp on a file (as displayed by the ls -l command) in the source directory overwrites the timestamp on a file of the same name in the destination directory. however!! the timestamp on an existing subdirectory in the destination directory stays unchanged. and if the command creates a new subdirectory in the destination directory, that new subdirectory's timestamp is set to the time of the copy operation β€” not to the timestamp that subdirectory has in the source directory. yeah, it's lowkey weird, but that's the deal πŸ•

Here's the iconic part: up is idempotent. meaning if its execution gets interrupted by a network, server machine, or process outage, then a subsequent reissue of the same command continues from the interruption point β€” it does not start over from the beginning. this saves time and reduces network traffic compared to the UNIX commands that provide similar functionality. no cap, that's main character energy πŸ”₯

up returns a status code of 0 (zero) only if it succeeds. otherwise it returns a status code of 1 (one). binary. simple. slay ✨

one thing to know fr fr: this command does not use the syntax conventions of the AFS command suites. you must provide the command name and all option names in full. no abbreviations, no shortcuts, periodt πŸ’…

πŸŽ€ OPTIONS πŸŽ€

  • -v β€” prints a detailed trace to the standard output stream as the command runs. it's the "tell me everything" flag πŸ—£οΈ
  • -1 β€” copies only the files in the top level source directory to the destination directory, instead of recursing down through subdirectories. the source directory's ACL still overwrites the destination directory's, though. (this is the number one, not the letter "l" β€” important!!) πŸ™ˆ
  • -f β€” overwrites existing directories, subdirectories, and files even if the first (user) w (write) mode bit is turned off on the version in the destination directory. it's the "I said what I said" flag πŸ’ͺ
  • -m β€” recognize and copy mount points rather than traversing the volumes they reference during the recursive copy operation. without -m, up's default behavior is to copy the contents of all volumes and subvolumes mounted under the source directory into the volume containing the destination directory. so pick your fighter πŸ₯Š
  • -r β€” creates a backup copy of all files overwritten in the destination directory and its subdirectories, by adding a .old extension to each filename. safety net, we love her 🫢
  • -x β€” sets the modification timestamp on each file to the time of the copying operation. fresh timestamps, fresh start ⭐
  • source directory β€” names the directory to copy recursively.
  • destination directory β€” names the directory to copy to. it does not have to exist already. she'll create it, don't stress πŸ’–

🌈 EXAMPLES 🌈

the following command copies the contents of the directory dir1 to directory dir2:

% up dir1 dir2

and that's literally it. two args. go off πŸ’…


πŸ”’ PRIVILEGE REQUIRED πŸ”’

The issuer must have the a (administer) permission on the ACL of both the source and destination directories. both. not one. both. iykyk πŸ‘‘


IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.


and that's the whole page, bestie πŸ’œ this was brought to you by OpenAFS, dated 2026-07-27, and yeah, it's the AFS-UP(1) manual. now go forth and copy recursively, you absolute icon πŸŒŸπŸŽ€βœ¨

πŸ“¦ where this page comes from