Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've mounted a Windows 7 directory on my FreeBSD box via smbfs:

mount
...
//ROOT@BARYONYX/GVKV on /usr/home/gvkv/win (smbfs)

but for some reason when I try to copy a directory:

cp .vim /win 

I get the following error:

cp: .vim is a directory (not copied).

I can copy files just fine. Is there something special about directories and smb shares?

share|improve this question
up vote 10 down vote accepted

It's nothing to do with smbfs, cp always requires the -r (recursive) flag to copy a directory. You should get the same if you try to cp .vim /tmp/:

$ cp .vim /tmp/
cp: omitting directory `.vim'
zsh: exit 1     cp .vim /tmp/
$ cp -r .vim /tmp/
$
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.