in unix how to change old name to new name
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
What is kill 9 in linux?
How can I check the exit status of my previous command in Linux operating system?
0 Answers SwanSoft Technologies,
which command is used to see all the system configuration? like hardware, HDD, memory etc.
14 Answers ADS, eClinicalWorks, NJN,
How do you clear the screen in linux?
what is difference between $@ and $* in UNIX Shell script
How do you grep?
You attempt to delete a file called sales.mem using the rm command but the command fails. What could be the problem?
What is the command to list ALL (hidden also) files of current directory & it’s subdirectories?
Write a command that will look for files with an extension "c", and has the occurrence of the string "apple" in it.
You suspect that you have two commands with the same name as the command is not producing the expected results. What command can you use to determine thelocation of the command being run?
What is DISM command?
Which commands are used to set a processor-intensive job to use less cpu time?