Search

"cp: omitting directory" error in linux

This is a common error a number of newbies in Linux might face when using the command "cp" to copy a directory.



The command cp is by default copies only files and if we try to copy a directory it will throw the above error.

To copy a directory using "cp" all we have to do is add the option "-r" which means recursively copy all the files from the source directory to the destination directory. i.e.




Follow by Email