in unix how to change old name to new name

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of commands are there in linux?

562


What is the difference between diff and cmp command in unix?

480


You want to know how many lines in the kickoff file contains ‘prize’. Which of the following commands will produce the desired results?

549


What is the export command used for?

522


Who whoami linux?

553






Who am I command in linux?

557


What are the basic command in linux?

534


What is lsof command in linux?

583


How do I check cores in linux?

537


What are different command to check ram, process and hdd of linux machine?

532


What are the basic dos commands?

548


What is env command in linux?

507


How compile c++ program in cmd?

601


What language is a makefile written in?

517


What is devops model?

516