Linux Error Says Cp: Omitting Directory Linux Command Error

Forums » Linux Systems » Linux Error Says Cp: Omitting Directory Linux Command Error
This Page Contains information about Linux Error Says Cp: Omitting Directory Linux Command Error By wallpaperama with 54 Replies. Last Upated: Thu Apr 17, 2014
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 directory

this 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

hope this helps.

if you ever need web hosting, visit www.webune.com they have excellent service.
Yadda
The given solution fixes the problem but unfortunately the article doesn't explain *why* it does... So in the long run it's rather useless.
rob
whenever you want to know something about a command, visit the man pages, for example: man cp

in the instructions, you will see why the -r

but ill tell you, it means recrusive, meaning including all the files/directories (sub-directories) within the copied directory
serg
Thank you work perfect for me
Anne
Thank you -- exactly what I needed to copy a directory of files from disk to a network appliance.
banzai
This is rather useless, since its a partial solution (not an answer). In the wonder land this is usually caused by trying to copy to multiple targets such as when shell expansion is used or output from other commands
http://wallpaperama.com/forums/cp-omitting-directory-linux-command-error-t1580.html
Daniel
Thank you a lot :D I don't use this command as often and had completely forgot that you need to use -r for domains.
nawraj
thank you............
Housefly
It works becuase it fails if you do not specify any specific or wildcard files. -r makes it recursive - meaning it will include subfiles/folder Does it make sense?
Cherodney
02-1580-128-1796899878919-1132407908-2085729-4325112-n.jpg
It works just fine. Love it
James
Thanks. It worked like MAGIC!
Ivanof
Great!! Thanks! :D
MyNameIs1337
yep works!
Cesar
there's always someone annoying. It works, that's all.
Captnbob
Thank you. Thank you. Once again thanks.
shbk
man cp -R, -r, --recursive copy directories recursively i understand it so: you can't copy directory without files which lie inside , and cp looks which files are inside only with -R option
chandrashekar
It's working ,Thanks buddy
Dude
Doesn't work. It copies some other files too. This is NOT the solution, so be careful.
prohor
I want to know how it works and why the error occur...
Sai
Thanks a lot
Sridhar
Thanks sir...it really helped me :)
Roshan
wow man ....but how its works tell me .
YOU_LAZY
it worked for me. if you want to know why..

READ A BOOK!!!
Manus
Thanks a lott ... it worked
M
thanks dude
Amol
Thanks for your help!!
tag
helped a lot man. thanx
Petka
Very nice article.
petka
mahrizal
thank's it works for me
khaled
thanks :)) baraka allah fik
dtop
Thank you.
JimP
Thanks for immediate help on the Internet. This solved my problem. I'm bumbling and stumbling and learning as I go.
Aaron
I believe -r stands for recursive. I think you get this error when you try and copy a directory and its contents and not a file, so it needs the recursive command.
kranthi
good,this is one way of distributing knowledge, very use full in trouble shotting
sharvari
Works .. But how??
Esp
Thanks man
arun
thanks a lot man
NIRAV
grt sir, it seriously helped me out
Deepak
Thanks a lot!!
picillo
Thank you.
rytho7533
This does not work for me. I then get errors "cp: reading" ...: "Input/output error" for each file I am trying to copy.
Thije
thanks a lot!
swarnim
thank you.........
gilad
THANK YOU!!! I'm sending you all my love!
Ravindra
cp -R /file_name /mnt/Centos
ankur
thank you sir awesome..
totem
thank you :)
OuS
Thank you very much!! Thank you very much!!
Gebreab
Thank you I just read it for a while and apply perfectly done!!
Stuart
thanks mate, just what I needed! thanks mate, just what I needed!
david
Thanks for the post, it worked great, and it says my message is short, so I'm making it bigger.
Biljana
Thank you so much. It works for me. :) Thank you.
Title: Linux Error Says Cp: Omitting Directory Linux Command Error [2920]
Tags: cp omitting directory linux command error