directories

Package: WA2L/edrc 1.5.57
Section: Library Commands (3)
Updated: 20 January 2010
Index Return to Main Contents

 

NAME

directories - filter to expand filelist with overlying directories

 

SYNOPSIS

edrc/lib/directories

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

expand a file list data stream received via stdin with the overlying directories and print the result to stdout.

This can be used to ensure when copying data that the directory permissions are set correctly.

Suppose the following command is issued as the root user:

  find /data/source/myApp -name *.java -print |\
    cpio -pdvum /backup/myApp/20100117

This will copy all *.java files in all underlying directories from /data/source/myApp to the /backup/myApp/20100117 directory, but all directories will have the ownership of the root user and the permissions will be set accordingly to the umask of the root user. All *.java files will have the correct permissions and ownership.

When using the directories command as the following example:

  find /data/source/myApp -name *.java -print | directories |\ 
    cpio -pdvum /backup/myApp/20100117

all permissions and all ownership will be correct.

 

OPTIONS

-

 

ENVIRONMENT

-

 

EXIT STATUS

0
always.

 

FILES

-

 

EXAMPLES

-

 

SEE ALSO

edrcintro(1), cpio(1), find(1), sparse(3)

 

NOTES

-

 

BUGS

-

 

AUTHOR

directories was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2010 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:52:45 GMT, August 28, 2024