in unix how to change old name to new name

Answers were Sorted based on User's Feedback



in unix how to change old name to new name..

Answer / pravin virkud

mv <old name> <new name> // for rename the file in the same
directory

mv <old name> /<absolute path>/<new name> for rename and
move the file in other diretory.

Is This Answer Correct ?    31 Yes 3 No

in unix how to change old name to new name..

Answer / javed

mv <oldfilename> <newfilename>

eg:-
[root@localhost]# touch file1 //created a file named file1
[root@localhost]# ls //displays the file created
file1
[root@localhost]# mv file1 file2 //command to rename file1
[root@localhost]# ls //displays the renamed file
file2

Is This Answer Correct ?    14 Yes 0 No

in unix how to change old name to new name..

Answer / googler

see there is no rename command in unix ,

so what u can use is "move" (mv) command

mv "(absolute path) old file name" "new file name"

Is This Answer Correct ?    12 Yes 0 No

in unix how to change old name to new name..

Answer / pawan

In Linux the Syntax to change the old name to new name

mv <Old Name> <New Name>

Example:

mv raj shyam
Its changed into shyam

Is This Answer Correct ?    6 Yes 0 No

in unix how to change old name to new name..

Answer / gaurav verma

1. open the file /etc/sysconfig/network and change the
parameter HOSTNAME=<old name> to new name.

2. restart the network services.
3. open the file vi /etc/hosts, and change the old name to
new name.

127.0.0.1 <old name> localhost.localdomain
localhost



Is This Answer Correct ?    7 Yes 2 No

in unix how to change old name to new name..

Answer / shital

in RHEL-5 to change old name to new name of file command is....

#rename <oldname> <newname> <oldname>



......OK shital

Is This Answer Correct ?    7 Yes 12 No

in unix how to change old name to new name..

Answer / kk.utnoor

rename <oldname> <newname>

Is This Answer Correct ?    2 Yes 15 No

Post New Answer

More Linux Commands Interview Questions

What command is used to check the number of files, disk space, and each user’s defined quota?

0 Answers  


in unix how to change old name to new name

7 Answers   Google,


Is python faster than bash?

0 Answers  


Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word orange in the files.

0 Answers  


You want to copy the user’s home directories to a new location. Which of the following commands will accomplish this?

0 Answers  


In /boot/grub/grub.conf file there is a line kernel /vmlinuz-version ro root=/dev/sda2, What is the meaning of "/" before vmlinuz? Pls explain?

1 Answers   HCL,


1. Why "d" is postfix in almost every service name of Linux like httpd, dhcpd? 2. how to restrict su & ssh services for some users? 3. how can we configure a default gateway for 10 n/w cards in a server?

6 Answers  


What is the default number of shell commands saved in the history list of .cshrc file?

0 Answers  


What does mkdir mean in linux?

0 Answers  


What are the files to be used in the network installation of linux os?

4 Answers  


What is $@ in bash?

0 Answers  


some one is asking my machine is slow what is your steps?

5 Answers   Oracle, Talent,


Categories