Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-02-22
3
Medium Priority
?
2,177 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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…

609 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