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 to recover /etc/passwd file and /etc/shadow file?

551


What does mkdir mean in linux?

611


What is the syntax of mkdir?

518


What are grep commands?

540


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

555






How can I check the exit status of my previous command in Linux operating system?

551


How do I check disk space in linux?

471


What is mkdir?

535


What does c mean in linux?

574


What is the pwd command?

571


What is bash linux?

522


What is a simple command?

570


What does chmod 644 do?

592


How do I find the process id in linux?

529


What is the difference between rmdir and rm r?

620