To stop or interrupt the cp
or mv
command in Linux or Unix, you can use the CTRL + C
keyboard shortcut. This will terminate the cp
or mv
command and return you to the command prompt.
For example, if you are running the cp
or mv
command to copy or move a file and you want to stop it, you can press CTRL + C
on your keyboard. This will terminate the cp
or mv
command and return you to the command prompt.
You can also use the kill
command to stop the cp
or mv
command. To use the kill
command, you need to find the process ID of the cp
or mv
command using the ps
command. For example, to find the process ID of the cp
command, you can use the following command:
ps aux | grep cp
This will show a list of processes with cp
in the command line, along with the process IDs.
Once you have the process ID, you can use the kill
command to stop the cp
or mv
command. For example, to stop the cp
command with process ID 12345, you can use the following command:
kill 12345