Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com 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

2 Answers 2

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

Your Answer

 
discard

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