How to copy multiple files and directories into some other
directory?

Answers were Sorted based on User's Feedback



How to copy multiple files and directories into some other directory?..

Answer / chets

cp <src_file1> <src_file2> <src_file3> <dest_dir>

In this case, each of the source files is copied into the
destination directory. This form of the command can be used
to copy all files in one directory into another directory.

Is This Answer Correct ?    3 Yes 2 No

How to copy multiple files and directories into some other directory?..

Answer / sangu

sorry for the previous post
cp -r test2 test1/
will work.

Is This Answer Correct ?    2 Yes 2 No

How to copy multiple files and directories into some other directory?..

Answer / shami.r

cp -r source_directory destination_directory

Is This Answer Correct ?    3 Yes 4 No

How to copy multiple files and directories into some other directory?..

Answer / sangu

If suppose the current working directory is test
i.e /home/test which contains the subdirectories test1
test2 if test2 to be copied in test1 the command is
cp test2 test1/
Now test1 will contain the test2 directory

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Unix Commands Interview Questions

Which command is used to copy files?

0 Answers  


what is the difference between relative path and absolute path?

7 Answers  


Who invented grep?

0 Answers  


The rm command removes links to file. What does this mean? How then is a file deleted from the file system?

5 Answers  


what is the difference between "cron" command and "at" command?

5 Answers  






what is Online(STM) and offline diagnostics in HP-UX?

2 Answers   HP,


what is the functionality of kernel in unix architecture?

13 Answers   HCL,


how to unzip the contents of the gzip file

1 Answers   Epsilon,


How to get the last ten lines of a file using awk utility?

1 Answers   Infosys,


What is the output of : $ ps-e $ ps-a commands

5 Answers   IBM,


what is the difference between pipe(|) and tee command..

3 Answers   Cap Gemini, Rolta,


what is the use of "fg" command ?

5 Answers   PSU, Sail,


Categories