.TH UP 1 .SH NAME up \- update a tree .SH SYNOPSIS .B up [ .B -cugst ] .I src .I dst .SH DESCRIPTION .I Up prints shell commands needed to make .I dst like .IR src . Both arguments may name files or directories and exist or not exist. .PP By default, user and group ids are ignored. Flag .B -u makes the user and group ids to be considered. Flag .B -g makes group ids to be considered. .PP Flag .B -c makes .I up report changes instead of commands to update the destination file. Each change is indicated by the initial of .IR added , .IR deleted , .IR mode-changed , and .IR changed followed by the file name, relative to the destination directory. .PP Flag .B -s makes the tool silent, reporting through the exit status non-nil only if .I src and .I dst differ. .PP Flag .B -t relies on the file length and modification time to guess if two files are the same or differ. Under this flag, no update is reported for files that exist both in the destination and the origin and are newer in the destination. .SH SOURCE .B /sys/src/cmd/up.c .SH EXAMPLE .EX ; up /rc/bin/patch /n/src/nix/rc/bin/patch chmod 0775 /n/src/nix/rc/bin/patch/applied fcp -x /rc/bin/patch/apply /n/src/nix/rc/bin/patch/apply chmod 0775 /n/src/nix/rc/bin/patch/create chmod 0775 /n/src/nix/rc/bin/patch/okay chmod 0775 /n/src/nix/rc/bin/patch/undo .EE