What are mv command options?

QuestionsQuestions8 SkillsProBasic Files OperationsOct, 23 2025
0152

Here are some common options for the mv command in Linux:

  1. -f: Force move without prompting for confirmation, even if it means overwriting an existing file.
  2. -i: Interactive mode; prompts for confirmation before overwriting an existing file.
  3. -n: No overwrite; does not overwrite an existing file.
  4. -v: Verbose mode; provides detailed output of what the command is doing.

These options can be combined to tailor the behavior of the mv command to your needs. For example:

mv -iv source.txt destination.txt

This command would move source.txt to destination.txt, prompting for confirmation if destination.txt already exists.

0 Comments

no data
Be the first to share your comment!