Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

For example, I want to rename tif/fat/tul/codes/ to in the same directory. Currently I know these:

mv tif/fat/tul/codes/ tif/fat/tul/codes/

, which requires me to repeat typing the full path (can be annoying if the path is quite long) or

cd mv tif/fat/tul/codes/

The drawback being I have to type 2 commands, and there is a side-effect of changing the current directory (which can be undesirable in many cases)

Is there a more efficient way to do this?

share|improve this question
This should answer your question:… – Glutanimate Apr 14 '13 at 10:45
find /path/to/dir/ -iname -execdir mv

/path/to/dir is path of directory in which you want to rename files.

Note: This will rename all files in directory /path/to/dir/ and its subdirectory.

share|improve this answer

Another thing you can do is open another shell (like bash) in your current one, cd to the directory of the file, and then mv. Then you just move back to your previous directory with Ctrl+D

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.