LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to rename a file from command line ??? (https://www.linuxquestions.org/questions/linux-software-2/how-to-rename-a-file-from-command-line-384063/)

waelaltaqi 11-17-2005 01:38 PM

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

nx5000 11-17-2005 01:42 PM

Yes, on command line:
mv /etc/dhcpd.conf.sample /etc/dhcpd.conf

jailbait 11-17-2005 01:43 PM

"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


All times are GMT -5. The time now is 11:36 AM.