cp/ditto and ignore I/O errors?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cp/ditto and ignore I/O errors?
# 1  
Old 06-08-2010
cp/ditto and ignore I/O errors?

Hi I am copying some old CDs to HD and while copying a lot of them have I/O errors. What I'm doing right now is sudoing the cp command to force the cp to finish but when I do this it takes about an hour to copy 500mb, which without errors would normally take 2-3 minutes.

I assume it takes so long because when it encounters an error it will just keep on trying to copy it until it fails a certain number of times then gives up? Is there any way I can tell it to not try so many times and give up faster, or just ignore the errors and copy what it can?
I also tried the ditto command and it seems to just be doing the same thing as cp...
So basically I just want it to copy and if it encounters an error to move on to the next file. If we can figure out a good way to do this I would also like to get it to output the errors to a text file, I was thinking:

"$ sudo cp -R /Volumes/Source/ ~/Destination/Destination/ 2>&1 | cat /Destination/Destination/log.txt" ?
If I could add something to that to get it to ignore the errors that would really save me a lot of hours and I would be very grateful, and also would the above work to save the std error output to a txt file?
Thanks.
Any help is appreciated.
I'm running OS X 10.5

Last edited by pludi; 07-04-2010 at 12:58 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to ignore first or last parameter

Can someone help me of doing something like this send.sh #!/bin/bash for last; do true; done echo $* | gammu sendsms TEXT $last every thing is good except that when i launch the script like this ./send.sh This is the message i want to send +63922XXXXXXX it turned out the message of... (2 Replies)
Discussion started by: arturo322
2 Replies

2. UNIX for Dummies Questions & Answers

How to ignore errors in script

I have a simple script that processes files. Here's a simplified example of what I'm doing: foreach t (web.*) mv $t dnw$t:e.log end foreach t (card.*) mv $t card$t:e.log end The problem is that sometimes there is no web.* file. In that case, I get an error "foreach: No match" and... (4 Replies)
Discussion started by: software5723
4 Replies

3. UNIX for Dummies Questions & Answers

Forcing Makefile to Ignore Errors

Is there A way I can Force a makefile to ignore errors? i believe it is using gcc. i have a set of commands in the makefile that i want to run and each time the makefile gets to the point of this commands, it aborts because of the commands. how can i get the makefile to keep running... (3 Replies)
Discussion started by: SkySmart
3 Replies

4. UNIX for Dummies Questions & Answers

please ignore this....

Most of the people think that they can not use Unix as desktop. By this poll we gone tell them that we not just use Unix as desktop but also love different display managers like GNOME, KDE etc..... (1 Reply)
Discussion started by: ynilesh
1 Replies

5. UNIX for Dummies Questions & Answers

Major OS errors/Bash errors help!!!!

Hi all, dummy here.... I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: [: =: unary... (12 Replies)
Discussion started by: wcmmlynn
12 Replies

6. Shell Programming and Scripting

How to ignore '.' files

I'm running Fedora Core 6 as an FTP server on a powerMac G4... I'm trying to create a script to remove files older than 3 days... I'm able to find all data older than 3 days but it finds hidden files such as /home/ftp/goossens/.canna /home/ftp/goossens/.kde... (4 Replies)
Discussion started by: James_UK
4 Replies

7. AIX

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies

8. UNIX for Advanced & Expert Users

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies

9. UNIX for Dummies Questions & Answers

Command: ditto on mac os x?

Hi, I am trying to find more information on a command called ditto on Mac OS X. Can someone point me to the right direction. Thanks, -n (2 Replies)
Discussion started by: Insomniac
2 Replies
Login or Register to Ask a Question
XkbCopyKeyTypes(3)						   XKB FUNCTIONS						XkbCopyKeyTypes(3)

NAME
XkbCopyKeyTypes - Copy more than one XkbKeyTypeRec structure SYNOPSIS
Status XkbCopyKeyTypes (XkbKeyTypePtr from, XkbKeyTypePtr into, int num_types); ARGUMENTS
- from pointer to array of XkbKeyTypeRecs to copy - into pointer to array of XkbKeyTypeRecs to change - num_types number of types to copy DESCRIPTION
XkbCopyKeyTypes copies num_types XkbKeyTypeRec structures from the array specified by from into the array specified by into. It is intended for copying between, rather than within, keyboard descriptions, so it doesn't check for overlaps. The same rules that apply to the from and into parameters in XkbCopyKeyType apply to each entry of the from and into arrays of XkbCopyKeyTypes. If any allocation errors occur while copying from to into, XkbCopyKeyTypes returns BadAlloc. Otherwise, XkbCopyKeyTypes copies from to into and returns Success. RETURN VALUES
Success The XkbCopyKeyTypes function returns Success when there are no allocation errors. STRUCTURES
Key types are used to determine the shift level of a key given the current state of the keyboard. The set of all possible key types for the Xkb keyboard description are held in the types field of the client map, whose total size is stored in size_types, and whose total number of valid entries is stored in num_types. Key types are defined using the following structure: typedef struct { /* Key Type */ XkbModsRec mods; /* modifiers used to compute shift level */ unsigned char num_levels; /* total # shift levels, do not modify directly */ unsigned char map_count; /* # entries in map, preserve (if non-NULL) */ XkbKTMapEntryPtr map; /* vector of modifiers for each shift level */ XkbModsPtr preserve; /* mods to preserve for corresponding map entry */ Atom name; /* name of key type */ Atom * level_names; /* array of names of each shift level */ } XkbKeyTypeRec, *XkbKeyTypePtr; DIAGNOSTICS
BadAlloc Unable to allocate storage SEE ALSO
XkbCopyKeyType(3) X Version 11 libX11 1.5.0 XkbCopyKeyTypes(3)