Computer Science - Unix - Discussion

Discussion :: Unix - Section 2 (Q.No.3)


Which of the following commands is used to rename a file?

[A]. rename
[B]. remove
[C]. mv
[D]. ren
[E]. None of the above

Answer: Option C


No answer description available for this question.

Karthika said: (Jun 22, 2012)  
mv cmd used for moving/renaming files.

Abhilasha said: (Feb 11, 2014)  
Is the mv command rename the file? how?

Dinesh said: (May 29, 2015)  
If you have filename as: file1.

Let's change its name to myfile using mv:

$mv file1 myfile.

That's it simple!

Nilesh S. said: (Sep 29, 2016)  
If you use mv command on file in the same directory then it works as rename.

If you have a file the name of that file is one.txt you use mv command then $mv one.txt two.txt then here one.txt file name changed to the two.txt.

Manjeet said: (Oct 27, 2016)  
How can we rename it?

I think ren command is used for renaming a file.

Bhaiya Gaikwad said: (Aug 10, 2017)  
MV command has 1 inode number if u move a file on location to another location u can rename this file but inode number is same only rename the file.

Right answer is MV.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.