LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-10-2003, 10:23 PM   #1
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 636

Rep: Reputation: 32
How do I rename a file?


What is the command to rename a file from the commandline?
 
Old 10-10-2003, 10:24 PM   #2
linuXBOX
Member
 
Registered: Jul 2003
Location: Stuart,FL
Distribution: Fedora Core 3 and Slackware 10.0
Posts: 179

Rep: Reputation: 30
ren oldfilename newfilename i believe....btw shouldn't this be in ur manual or something?
 
Old 10-10-2003, 10:25 PM   #3
doktaoktagon
LQ Newbie
 
Registered: Oct 2003
Location: Sacramento, CA
Distribution: Redhat 9
Posts: 3

Rep: Reputation: 0
just use mv....

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

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

 
Old 10-10-2003, 10:26 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,205

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
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'
 
Old 10-10-2003, 10:27 PM   #5
doktaoktagon
LQ Newbie
 
Registered: Oct 2003
Location: Sacramento, CA
Distribution: Redhat 9
Posts: 3

Rep: Reputation: 0
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'

 
Old 10-10-2003, 10:28 PM   #6
linuXBOX
Member
 
Registered: Jul 2003
Location: Stuart,FL
Distribution: Fedora Core 3 and Slackware 10.0
Posts: 179

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple File Rename windisch Linux - General 11 11-10-2005 12:19 PM
How can i Rename file? Khmer Linux - Newbie 4 10-21-2005 08:09 AM
rename file with a pattern sujith_deva Programming 7 12-16-2004 07:39 PM
Can't rename file with parenthesis in name pleasehelp Linux - Newbie 4 03-16-2004 03:01 PM
How to rename a file? juanb Linux - General 4 03-19-2003 11:20 AM


All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration