Recursive linking/deleting utility, version 0.4. Usage: reclinker [-l|-d|-t] [options] <from> <where> [<file>...] The program has a linker, a deleter and a test mode. By default it's in linker mode. It gets into deleter mode if it's invoked as recdeleter, and into test mode if it's invoked as reclinktester. Linker/deleter/test mode may be forced with the -l/-d/-t switches. In linker mode it mirrors the directory tree under <from> to under <where> and symlinks files there. The symlinks point to the basename of the file processed, prefixed with <prefix>. If <prefix> is not given, it defaults to the absolute pathname of <from> (ie., the symlink points to the correct absolute filename). In deleter mode it deletes non-broken symlinks (empty directories) of the form <where>/foo, where <from>/foo is an existing file (directory). (A dir is also considered empty if it gets empty during the deletion procedure.) In test mode it tests whether symlinks/dirs under <where> corresponding to files/dirs under <from> exist, and whether are they created properly. If extra arguments are given, then they will be treated as files named relatively from <from>, and they will be proceeded individually (no mass action is taken). If "-" is among these extra arguments, then individual file names are also read from stdin; if "0-" is among them, individual file names are also read from stdin, being separated by '\0'. Options common for all modes: -h print this message and exit -U <user> skip file under <from> if it's not owned by <user> -G <group> skip file under <from> if it doesn't belong to <group> -v/-q increase/decrease verbosity level (currently 0, 1, 2 are in use, default is 1) Options in linker mode are: -r produce relative symlinks -f overwrite existing files -m <mode> create new directories with mode <mode> ( &'d with umask!) -o force <mode> given by -m for all processed directories (if -m is not used, the mode of the actually processed dir is forced) -u <user> newly created dirs/symlinks shall be owned by <user> -g <group> newly created dirs/symlinks shall belong to <group> -D only directories are proceeded -p <prefix> prepend <prefix> to link targets Options in deleter mode are: -f delete corresponding file even it's not a symlink -m <mode> deletes <where>/foo only if <from>/foo is of mode <mode> -o only broken symlinks are deleted -u <user> deletes <where>/foo only if it belongs to <user> -g <group> deletes <where>/foo only if it belongs to <group> -D don't delete directories Options in test mode are: -r test symlinks as if they were created using -r in linker mode -m <mode> skip foo if <from>/foo isn't of mode <mode> -u <user> skip foo if <where>/foo is not owned by <user> -g <group> skip foo if <where>/foo doesn't belong to <group> -p <prefix> test links assuming they were created using "-p <prefix>" Return values: 0 - success; 1 - fatal error; 2 - some act failed but just kept on doing; 3 - arguments imply nothing happens (eg., bad options used)