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

how unix kernel distinguishes between a normal file and device file ?

7 Answers   Google, IBM, McAfee, Vodafone,


what is the use of the hidden files?

3 Answers  


How do you remove a crontab file?

6 Answers  


what is the command to find out which shell you are running?

14 Answers  


The command grep first second third /usr/you/myfile a) prints lines containing the words first, second or third from the file /usr/you/myfile b) searches for lines containing the pattern first in the files second, third, and /usr/you/myfile and prints them c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them d) replaces the word first with the word second in the files third and /usr/you/myfile e) None of the above

4 Answers   IBM,


What does pipe () return?

0 Answers  


what these two commands prints "echo test","cat test"?

6 Answers   TCS, Wipro,


Which command is used to find whether the system is 32 bit or 64 bit?

0 Answers  


What is the use of cut command in unix?

0 Answers  


How many unix commands are there?

0 Answers  


What is mtime in find command?

1 Answers  


What is pid?

4 Answers  


Categories