Why does the command mv return the message mv: cannot move Device or resource busy on Linux?
From the rename(2)
man page:
EBUSY The rename fails because oldpath or newpath is a directory that
is in use by some process (perhaps as current working directory,
or as root directory, or because it was open for reading) or is
in use by the system (for example as mount point), while the
system considers this an error. (Note that there is no require‐
ment to return EBUSY in such cases — there is nothing wrong with
doing the rename anyway — but it is allowed to return EBUSY if
the system cannot otherwise handle such situations.)
Some process is using the file/s. You can find what files are open by what processes using the command 'lsof' (list open files). This will return a lot of open files. Once you've found the process, you could try killing it.
Or restarting the computer may be easier if that is an option.