How do you move or rename a file or directory?



How do you move or rename a file or directory?..

Answer / hr@tgksolutions.com

The mv command serves the dual purpose of moving and renaming files or directories. To rename a file, mv old_filename new_filename is used. Similarly, to move a file to a different directory, the format is mv filename target_directory/. The same logic applies to directories. It’s a versatile command that aids in organising and re-structuring file locations and names.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

what is virtual machine?

2 Answers   Infosys,


What is the command to find maximum memory taking process on the server?

0 Answers  


to list a particular line in the file

5 Answers  


What is mtime in find command?

1 Answers  


what is ls -ltd?

5 Answers   HCL,






How do I run a bash script?

0 Answers  


What is pid?

4 Answers  


How can you copy files or directories?

1 Answers  


How do I use nslookup?

0 Answers  


how will you convert a general file to a hidden file?

4 Answers  


How does one process we can start an executable file? How to get the PID process, which we started?

6 Answers  


How do I use grep to find a file?

0 Answers  


Categories