-1

I have a NAS mount, and I can copy file to this,
but I can't copy files similar to this

cp /home2/user/WRF/WRFV3/run/*_2 . -v
`/home2/user/WRF/WRFV3/run/wrfout_d04_2007-11-21_00:00:00_2' -> `./wrfout_d04_2007-11-21_00:00:00_2'
cp: cannot create regular file `./wrfout_d04_2007-11-21_00:00:00_2': Not a directory

I get this error.

EDIT

when I try make a file with : in the name, I get a error

$ date >> file\:file
-bash: file:file: Not a directory

but this command work in my home

JuanPablo
  • 913
  • 3
  • 10
  • 21

2 Answers2

1

If your NAS server is running samba/smb/cifs then it may object to colons (:) in file names (subject to mapchars being set).

ramruma
  • 2,740
  • 1
  • 15
  • 8
0

You receive the error when you try to copy a symbolic link.

Do you want copy also the symbolic link?

If the answer is yes use the flag "-d"

-d, --no-dereference Copy symbolic links as symbolic links rather than copying the files that they point to, and preserve hard link relationships between source files in the copies.

NoNoNo
  • 1,963
  • 14
  • 20