“cp : omitting directory” Gotcha

The Linux cp command by default, copies only the files and not the subdirectories within a directory. cp:omitting directory ‘directory’ is a warning telling that the named directory has not copied.


To copy the whole directory, we should give the -r or -R or –recursive switch to cp.

cp -r source/ destination/

cp_recursive copy

Plus you can add the -v switch to get the verbose output to see the files that are being copied.

cp_recursive copy_verbose

More discussion is at AskUbuntu.

About Deepak Devanand

Seeker of knowledge
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s