Solved

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

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now