LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with cp (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-cp-68253/)

Krysith 06-26-2003 02:19 PM

Problem with cp
 
Hello Linuxers,

I have a RH 8.0 system. I have encountered the following problem on a regular basis:

I have a Sony Microvault USB device which uses a 32 MB vfat file system. I use this to take files home from work occasionally. I am able to mount it without a problem, and some days it works alright. However, sometimes it appears to have corrupted data on it or something, and I have problems. When I use GNOME to try to copy files to my harddrive, sometimes it just hangs. If I try to click cancel, nothing happens. The rest of GNOME keeps working, but the folders involved in the transfer are stuck in the copying process, and can't be unmounted or used for other purposes. Thinking that GNOME might be the problem, I tried cp'ing the files command-line style. It sticks there too, and killall cp doesn't stop it either. The only way to stop the process is to reboot, and sometimes GNOME won't respond and I have to reboot old school.

I don't think that the problem is really corrupted data, because it should just transfer over the bad data. I don't think it is a hardware problem with the Microvault, because it works fine transfering files between Windows computers. Frankly, whatever the problem is, my big dissapointment is that Linux would get stuck in such a simple function as cp! How do I get out of this process? If killall -f cp doesn't work, what will?

I'd appreciate any help offered, either on the copying problem or just how to cancel out of the copying process.

Thanks!

Mara 06-26-2003 04:05 PM

Kill should work correctly, but it may be a problem with the driver - when driver hangs, killing cp won't help.

Krysith 06-26-2003 04:08 PM

Thanks Mara,

So it may be the driver. I only have that one available driver, but I will look around... Is there anything one can do to kill a process when the driver hangs?

Mara 06-26-2003 04:31 PM

Rather not. What I'd do in your place is a bug report to authors of the driver (maybe you have something interesting in your logs when it hangs?).

chapzilla 06-26-2003 04:35 PM

Have you tried killing the shell in which the cp was started? If you kill the shell, the cp should die as well.

To kill cp, get the pid by doing ps -ef | grep cp:

[root@localhost root]# ps -ef | grep cp
root 23542 4176 0 12:42 pts/0 00:00:00 cp

Then, do kill -9. I've never heard of kill -9 failing.
[root@localhost root]# kill -9 23542
[root@localhost root]#

To kill the parent process, use the second number:

[root@localhost root]# kill -9 4176



All times are GMT -5. The time now is 01:28 PM.