?
Solved

linux copy giving error message cp: cannot create special file...

Posted on 2011-02-22
3
Medium Priority
?
2,075 Views
Last Modified: 2012-05-11
Trying to move a folder to a mounted drive.  Folder is on ubuntu 8 and destination is mounted share on Windows server 2003.

find /opt/backup/backup-zimbra/ iname '2011*' -mtime -1 -exec cp -r {} /mnt/zimbraBackup/ \;

find command works and so does cp if I leave off the -r.  But I need to keep the file tree structure in tact. When i use cp -r I get this error message for some but not all files being copied.

cp:cannot create special file ' mnt/zimbraBackup/backup-zimbra/2011-02-16-00-30-01/cyrus-sasl-2.1.23.3z/state/mux': Operation not permitted

Any help on how I  can copy this and retain the directory tree would be greatly appreciated.
0
Comment
Question by:chenault68
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Expert Comment

by:mccracky
ID: 34956250
It could be that you are trying to copy a file into a place in the tree that doesn't yet have that directory created.  

the -r option usually applies to the source, not the destination.

wget or rsync might be better to keep the directory structure intact.
0
 
LVL 10

Accepted Solution

by:
abbright earned 2000 total points
ID: 34958507
The error message sounds as if the cp-command tries to copy a "special" file which does not work. Special files in Linux are for example fifo queues or block devices which are not real files but rather communication devices or so represented in the filesystem.
I guess it is not possible to copy these as you try to copy them to a Windows server share and the windows NTFS-filesystem does not support those special files.
0
 

Author Closing Comment

by:chenault68
ID: 34966667
Had to change tactics.  Went with tar instead of cp

thanks
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question