Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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've this file I just downloaded with the name 최고다 이순신.E39.130720.HDTV.XViD-HANrel.avi, and I've the subtitle file You'

How can I rename the video file (in command line) with the same name as the subtitle file?



share|improve this question
up vote 0 down vote accepted

I hope someone has a better solution, but here's what I would do:

  1. In the directory in which the file resides, do ls -li and get the inode number of the file -- it shall be listed in the first column of the output.
  2. In the same directory, execute: find . -maxdepth 1 -inum 1234567 -exec mv {} new-name-of-file.blah \; substituting the 1234567 for your file's inode number, and the new-name-of-file.blah with the new name that you want to give.

Note that the \; part of the find command is necessary to signify the end of the command.

share|improve this answer
Great answer. Easy to understand for me. Thanks – Kiddo Aug 2 '13 at 7:56

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.