Solved

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

Posted on 2011-02-22
3
1,962 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 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