centos - linux install command not working quite right -
trying create spec file install number of files (where number , layout of files may change) without having manually create target directory structure or specify individual files.
i looked @ install command:
# install --help usage: install [option]... source dest (1st format) or: install [option]... source... directory (2nd format) or: install -d [option]... directory... (3rd format) in first 2 formats, copy source dest or multiple source(s) existing directory, while setting permission modes , owner/group. in third format, create components of given directory(ies). ... -d, --directory treat arguments directory names; create components of specified directories -d create leading components of dest except last, copy source dest; useful in 1st format
looks -d want - creates directory structure me! ran:
install -v -d -m 644 /usr/src/redhat/build/samples/lib/* /var/tmp/samples-6.0.0-root//usr/client/samples/lib/
and received following error:
install: installing multiple files, last argument, `/var/tmp/samples-6.0.0-root//usr/client/samples/lib/' not directory try `install --help' more information.
what have done wrong, shouldn't -d strip last '/xxx' , create preceeding structure, copy files source? tried added dummy char end of dest, no luck. added -d command line, receive errors of form "xx exists not directory". so, remove -d and, while dest structure created, no files copied.
so, -d valid option? version of install 5.2.1. might older, it's have use.
Comments
Post a Comment