How kill cp in Linux?
19,882
Solution 1
Just try CTRL+C in the terminal which cp works in. (I've assumed that you didn't send cp to background, which I don't do often.)
Solution 2
You can't kill process if it waits for some kernel syscall. For example if drive is busy or filesystem is otherwise locked up then you can't kill this process. How does your process look like if you do "ps -l". WCHAN and STAT are attributes you need to look at.
Related videos on Youtube
Author by
rpitch s
Updated on September 18, 2022Comments
-
rpitch s over 1 year
I see in:
ps aux
that exists process like:
cp file.txt /home/file.txt
This file is very big.
I try to kill like:
kill -9 12345
12345 is pid. But without success. What else I can do? What the reason?
P.S. 12345 0.0 0.0 7890 704 ? D 14:42 0:05 cp
-
Patrick B. over 12 yearsPlease give the full line of the process in
ps aux
. -
Karoly Horvath over 12 yearskill should work.. do you copy from/to a special drive which can block/jam like CD or some network drive?
-
Diogo over 12 yearsYou can stop the process using CTRL+C. This will send a signal to cp stop.
-