Quantcast

Failure of cp comman?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Failure of cp comman?

Knute Johnson-10
I'm backing up my important files at night to a thumb drive formatted
with FAT32.  One of the files to be copied has two colons in the file
name.  That isn't acceptable in a FAT file system and the log has the
following error;

/etc/cron.daily/system-backup:
cp: cannot create regular file
`/media/usbdisk/home/knute/.cpan/build/Mail-Sendmail-0.79-0k5uki/blib/man3/Mail::Sendmail.3pm':
Invalid argument

My question is what happens to the cp command when an error such as this
occurs?  Does it stop copying files or does it continue to copy all
files that don't have errors?  I've looked at man cp and info but there
isn't any information on what happens when an error occurs.

Thanks,

--

Knute Johnson
[hidden email]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Failure of cp comman?

Rodrigo López Dato
On Tue, Apr 26, 2011 at 15:18, Knute Johnson <[hidden email]> wrote:
> My question is what happens to the cp command when an error such as this
> occurs?  Does it stop copying files or does it continue to copy all files
> that don't have errors?  I've looked at man cp and info but there isn't any
> information on what happens when an error occurs.

I just tried copying two test files to an SD card formatted with FAT I
have lying around. They were called:

::.file
test.file

"cp -v *" failed to copy the file with the colons in it, but the other
one copied just fine. In fact, the error for the first file comes up
in the terminal before the second file is copied, meaning the copy
process isn't aborted. I guess this means errors like this aren't
fatal for cp.

Hope this helps!

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Failure of cp comman?

Knute Johnson-10
On 04/26/2011 11:34 AM, Rodrigo López Dato wrote:

> On Tue, Apr 26, 2011 at 15:18, Knute Johnson<[hidden email]>  wrote:
>> My question is what happens to the cp command when an error such as this
>> occurs?  Does it stop copying files or does it continue to copy all files
>> that don't have errors?  I've looked at man cp and info but there isn't any
>> information on what happens when an error occurs.
>
> I just tried copying two test files to an SD card formatted with FAT I
> have lying around. They were called:
>
> ::.file
> test.file
>
> "cp -v *" failed to copy the file with the colons in it, but the other
> one copied just fine. In fact, the error for the first file comes up
> in the terminal before the second file is copied, meaning the copy
> process isn't aborted. I guess this means errors like this aren't
> fatal for cp.
>
> Hope this helps!
>

Thanks Rodrigo!

--

Knute Johnson
[hidden email]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Loading...