IT Questions and Answers :)

Tuesday, December 24, 2019

What standard Linux command can be used to change the name of a file or directory?

What standard Linux command can be used to change the name of a file or directory?

  • nam
  • mv
  • chg
  • rename 

EXPLANATION

mv is a Unix command that moves one or more files or directories from one place to another. If both filenames are on the same filesystem, this results in a simple file rename; otherwise the file content is copied to the new location and the old file is removed.

mv stands for move. mv is used to move one or more files or directories from one place to another in file system like UNIX. It has two distinct functions:
(i) It rename a file or folder.
(ii) It moves group of files to different directory.
No additional space is consumed on a disk during renaming. This command normally works silently means no prompt for confirmation.
Syntax:
mv [Option] source destination
 

Share:

0 comments:

Post a Comment

Popular Posts