Super User is a question and answer site for computer enthusiasts and power users. 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

How would I rename a file, say old.txt to new.txt, in Linux using shell commands?

share|improve this question

migrated from May 20 '10 at 1:40

This question came from our site for professional and enthusiast programmers.

rename actually is a Linux command for renaming, though for a single file mv is used. rename is typically for batch renames. – Zurahn May 20 '10 at 3:12

mv old.txt new.txt

share|improve this answer

mv is a command that "moves" the file given as the first argument to the name specified in the second. In this case, you're just moving the file from one name to another in the same directory.

share|improve this answer

You must log in to answer this question.