Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was attempting to move files from one directory to another and was displayed the following message although the files were moved. Why does display the "error" and what does it mean? When does it occur? The directories are on the same device and partition. The device runs off Ubuntu 12.04 LTS


*mv: cannot move `.' to `../new_media/press/.': Device or resource busy*
share|improve this question
up vote 3 down vote accepted

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.)
share|improve this answer
Thanks. Is there a way to tell whether the said "directory" is in use by some other process? – PeanutsMonkey Dec 28 '12 at 7:48
If you're trying to move . then it's your current working directory and you should move out of it. – Ignacio Vazquez-Abrams Dec 28 '12 at 10:43

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.