How do you move or rename a file or directory?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between cat and more command?

879


What is the general format of unix command syntax?

1185


What does the command '$ls | wc –l > file1' do?

888


Differentiate cmp command from diff command.

786


How do you repeat a command in terminal?

819


What does grep v do?

750


What is command substitution?

869


What do chmod command do?

802


What does #!/ Bin sh do?

758


What is the use of the tee command?

802


What is the command to view process running?

784


What is the command to find hidden files in the current directory?

820


Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

1188


What is the use of finger command?

810


Which command will print your home directory on screen?

779