LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-17-2005, 01:38 PM   #1
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
How to rename a file from command line ???


i'm workin on a dhcp server. i copied dhcpd.conf.sample to /etc. then i deleted /etc/dhcpd.conf because it's emply. now i want to rename /etc/dhcpd.conf.sample to /etc/dhcpd.conf ...i have GNOME installed but i was only wondering if there is a way to do that from command line.
thanks
 
Old 11-17-2005, 01:42 PM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
Yes, on command line:
mv /etc/dhcpd.conf.sample /etc/dhcpd.conf
 
Old 11-17-2005, 01:43 PM   #3
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,548

Rep: Reputation: 180Reputation: 180
"i'm workin on a dhcp server. i copied dhcpd.conf.sample to /etc. then i deleted /etc/dhcpd.conf because it's emply. now i want to rename /etc/dhcpd.conf.sample to /etc/dhcpd.conf ...i have GNOME installed but i was only wondering if there is a way to do that from command line."

You rename a file using the mv command. When you mv a file to a different name in the same directory then mv simply renames the file. See:
man mv

----------------------------
Steve Stites
 
  


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
How to rename a file from command line ??? waelaltaqi Linux - Software 1 11-17-2005 01:49 PM
Command line: Rename several dist files at the same time ExCIA Linux - Newbie 2 04-28-2005 10:12 AM
rename files on a command line? CrazyPilot Linux - General 9 06-30-2004 04:10 PM
rename with command line shanenin Linux - Software 1 09-25-2003 07:03 PM
rename file/folder command hct224 Linux - Newbie 4 09-19-2003 09:44 AM


All times are GMT -5. The time now is 01:05 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration