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

Write a command to find all of the files which have been accessed within the last 30 days.

14 Answers   Cisco,


What is used to type command?

0 Answers  


Which command will print your home directory on screen?

0 Answers  


What Is the command to change a file's creation time. means one file is created at the time 15:19 then time should br changed to 14:14

8 Answers   3i Infotech, IBM,


What are Unix processes, and how do you manage them?

1 Answers  






How to get a particular string as your prompt ? Give syntax of that command?

3 Answers  


How do I use nslookup?

0 Answers  


What are the commands in UNIX to list the files in a Directory?

0 Answers   CGI,


Give a regular expression that finds two things, try to come up with regular expressions that find each individually using "egrep" command?

5 Answers  


how to delete entire records in unix ?

13 Answers   Cap Gemini,


What is rmdir command?

0 Answers  


How do you remove a directory?

1 Answers  


Categories