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 do you check which file consuming more space in linux?

469


How do you copy in terminal?

548


What command should you use to check the number of files and disk space used and each user’s defined quotas?

580


What is kill command?

496


Who unix commands?

599






What is the difference between rmdir and rm r?

609


What does chmod 755 do?

468


What is the command can be run to remove all the rules in an iptable table?

563


How do I check cores in linux?

523


What is apple llvm?

524


What is command line in unix?

501


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

540


please advice me what i have to prepare for NIC Exam(22-feb- 09). send me the question pattern for the 2 hrs exam. please sent it to manivannan_it15@yahoo.co.in

1894


What command used for showing user info like Login Name, Canonical Name, Home Directory,Shell etc..?

661


What does the command env do?

528