What does "cp: omitting directory" mean?

By default, cp copies only the direct files in, and not subdirectories in the directory. The message cp: omitting directory 'directory' warns you that the mentioned directory is not copied.

To do so, specify the -r (or --recursive) option:

sudo cp -r ~/Transfers/ZendFramework-1.11.4-minimal/library/Zend/* ~/public_html/cmsk.dev/library/

The manual page (command: man cp) contains an overview of the available options.


The message means that cp hasn't copied the directories listed. This is the default behaviour for cp - only files are copied normally, regardless of if you are specifying them explicitely or using *. If you want directories copying use the -r switch which means "recursive".


Couple of things here which need to check:

  1. Don't use sudo. You don't need it, you already have the permissions to write stuff in your own home directory.

  2. You can easily view hidden files and directories in the graphical file manager by selecting View/Show Hidden Files from the menu. Or by pressing Ctrl - H.

  3. You need to use the -R option in the cp command to copy a directory and it's contents.

  4. /home isn't your home directory. /home/username is. So you are probably trying to copy from wrong place.

  5. The shell is case sensitive, so ~/downloads and ~/Downloads are two different things.