- Forums
- Linux Systems
- [Resolved] Linux Error 'Cp: Omitting Directory' Copy Command
this is an error you might get on your linux machine when you try to copy files or directories using the cp command. This article will explain why you are getting this error and how to fix it so you can copy your files without any errors [2920], Last Updated: Sat May 18, 2024
wallpaperama
Thu Jun 21, 2007
56 Comments
78184 Visits
ok, i've done this so many times, and i just forgot how to overcome this error.
so i am writing this little how to just incase you are also having this problem.
if you are getting this error:
cp: omitting directorythis is what you need to do:
cp -r orginal_file new_file
so the trick here is to add the -r escape on your command and it shouldn't give you an error anymore
the -r options if for recursive, meaning copy all the files within a directory. the mostly likely reason you are getting this error is because you are trying to copy a directory which has other files or other sub-directories, so you need to tell linux to copy all the files withing (recursive).
hope this helps.
if you ever need web hosting, visit www.webune.com they have excellent service.