How can you copy files or directories?



How can you copy files or directories?..

Answer / hr@tgksolutions.com

To duplicate files or directories, UNIX offers the cp command. For copying files, the syntax is cp source_file destination_directory/. If duplicating a directory, the -r option (meaning recursive) must be added, as in cp -r source_directory destination_directory/. This ensures all sub-files and sub-directories are replicated too. The cp command is fundamental when backing up data or creating duplicate research resources.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

how to delete entire records in unix ?

13 Answers   Cap Gemini,


Which command should you use to find the remaining disk space in unix server?

0 Answers  


What does the command ' $who | sort –logfile > newfile' do?

0 Answers  


Explain mount and unmount command.

0 Answers  


What do chmod command do?

0 Answers  






Name the unix command to find how many days the server has been up.

0 Answers  


what will this do $cat > file.c ?(file.c is a file in current directory)

20 Answers   IBM,


what is the advaantage of each user having its own copy of the shell?

2 Answers   Infosys,


What is the use of the command 'ls -x chapter[1-5]' ?

0 Answers  


Describe the usage and functionality of the command rm –r * in unix?

2 Answers  


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

3 Answers   RBS,


Give two UNIX kernel parameters that effect an Oracle install

3 Answers   Oracle,


Categories