egrid-copy-dirhier
NAME
egrid-copy-dirhier - Replicate directory structure
SYNOPSIS
egrid-copy-dirhier [OPTIONS] [FILE ...]
Replicate a directory structure as read from the output of find ... -type d -printf '%u:%g:%m:%p'
Options:
- -P, --root-dir DIR
- Only make directories that start with DIR prefix in input file.
- -u, --default-user USER
- Make directories owned by user USER if the remote user name does not exist in local database. Defaults to the effective User ID.
- -g, --default-group GROUP
- Make directories owned by group GROUP if the remote group name does not exist in local database. Defaults to the effective Group ID.
- -x, --exclude PATTERN
- Ignore directories whose complete path matches regular expression PATTERN.
- --print
- Do not alter filesystem, instead, print commands that would be executed.
- -A, --args-from FILE
- Read additional command-line arguments from FILE as if they were typed on the command-line.
- --help
- Print help text and exit
- -V, --version
- Print version number and exit
DESCRIPTION
The command egrid-copy-dirhier expects as input a file containing lines having the form:
I<user>:I<group>:I<mode>:I<pathname>
(that is, like the output of find ... -type d -printf
'%u:%g:%m:%p') and will then replicate the whole directory structure,
making directories and changing ownership and permissions as needed.
Blank lines and lines starting with '#' are silently ignored.
If no file is specified on the command line, will read standard input.
If run by a non-privileged user, will exit with error if some group appears in output, which does not contain the user as a member.
If no allowable path-names are specified via the --root-dir option,
then allow any path-name, that is, make directories anywhere on the
file system.
BUGS
The ought to be a way to specify what to preserve, or what error conditions are considered fatal.
Very inefficient: makes directories one by one, instead of building a list and compacting filesystem access operations in one big run.
The --verbose option does not yet report very much information.
DOWNLOAD
You can download RPM packages of the EGRID SE Tools from http://www.egrid.it/download/rpm/RPMS.egrid; Debian packages from http://www.egrid.it/download/deb/egrid.
You can browse the source code for this software from the EGRID CVS at http://www.egrid.it/cvs/middleware/se/
COPYRIGHT AND LICENSE
Copyright (c) 2004,2005 Riccardo Murri riccardo.murri@ictp.it for the EGRID project http://www.egrid.it/
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
