LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I rename a file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-rename-a-file-102659/)

Thaidog 10-10-2003 10:23 PM

How do I rename a file?
 
What is the command to rename a file from the commandline?

linuXBOX 10-10-2003 10:24 PM

ren oldfilename newfilename i believe....btw shouldn't this be in ur manual or something?

doktaoktagon 10-10-2003 10:25 PM

just use mv....

if you want to rename /root/myfile.txt to /root/file.txt do this...

mv /root/myfile.txt /root/file.txt

:cool:

frieza 10-10-2003 10:26 PM

actually, ren is DOS, the linux command is mv, you move it from one filename to the other
so it would be 'mv oldfilename newfilename'

doktaoktagon 10-10-2003 10:27 PM

Quote:

Originally posted by frieza
actually, ren is DOS, the linux command is mv, you move it from one filename to the other
so it would be 'mv oldfilename newfilename'


:D

linuXBOX 10-10-2003 10:28 PM

whoops! you're right, I tend to confuse the two because many commands cross-reference...


All times are GMT -5. The time now is 08:14 PM.