April 19, 2012

How do I create a recursive copy of the /usr/shar/doc/HTML dir into a dir called Main?

I am taking a beginner class in Red Hat and need this for a test.

cd /usr/share/doc cp -a HTML /location/where/you/want/to/copy/to/Main

cd /usr/share/doc
cp -a HTML /location/where/you/want/to/copy/to/Main

Like  (0 likes)

the command your looking for would be cp -a (which copies recursively and...

the command your looking for would be cp -a (which copies recursively and maintains all permissions and ownership) /usr/shar/doc/HTML /dir/to/cpy/to/Main or if it is in the same folder just use ./Main

Like  (0 likes)

Hi,...

Hi,

You can try cp with either -r or -R or --recursive as an argument, e.g. cp -R
man cp or info cp would provide the helpful details.

Like  (0 likes)

After thinking about it, this is probably what you looking for:...

After thinking about it, this is probably what you looking for:

% cp -R /usr/shar/doc/HTML Main
Like  (0 likes)

% cd Main % cp -R /usr/shar/doc/HTML . -

% cd Main
% cp -R /usr/shar/doc/HTML .

-

Like  (0 likes)