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

What is ctrl d?

0 Answers  


How does the system know where one command ends and another begins?

0 Answers  


What does grep v do?

0 Answers  


What does the command '$ls | wc –l > file1' do?

0 Answers  


what does the 'tee' command do?

4 Answers  






What is updatedb?

0 Answers  


Explain command to show the space allocation of files?

0 Answers  


Is grep faster than awk?

0 Answers  


How to know a process is a zombie or orphan process?

3 Answers   Perot Systems,


What is the difference between AWK and SED commands? Plz give example and explain...

3 Answers   RBS,


what is virtual machine?

2 Answers   Infosys,


The command grep first second third /usr/you/myfile a) prints lines containing the words first, second or third from the file /usr/you/myfile b) searches for lines containing the pattern first in the files second, third, and /usr/you/myfile and prints them c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them d) replaces the word first with the word second in the files third and /usr/you/myfile e) None of the above

4 Answers   IBM,


Categories