pax will immediately exit with a non-zero exit status if EOF is ( CTRL+D) encountered when reading a response or if /dev/tty cannot be opened for reading and writing.
Otherwise, its name is replaced with the contents of the line. If this line consists of a single period, the file or archive member is processed with no modification to its name. If this line is blank, the file or archive member is skipped. For each archive member matching a pattern operand or each file matching a file operand, pax will prompt to /dev/tty giving the name of the file, its file mode, and its modification time. Interactively rename files or archive members. If the problems turn out to be more profound after all, though, it may also be of interest to you that pax supports. You can also add a print primitive to the filename substitution to get a list of all of those filenames which were changed: pax -rws'/\.JPG$/.CAP&/p' /root/of/copied/tree /dest/pathĪs near as I can tell, pax should already be installed on an OSX system, and so this should amount to a pretty stress-free solution overall. JPG are your only issues, that should just work. Furthermore, it checks extracted folders for repeated files and helps organize data stored in an archive folder. Unlike other duplicate finder and remover tools, Advanced Duplicate Cleaner scans archive files to detect duplicates. pax -rws'/\.JPG$/.CAP&/' /root/of/copied/tree /dest/path Keep archive files duplicate free with advanced algorithm.