How Do I Move a Non Empty Directory in Linux?
Contents

How do I move a non empty directory?

Frequent question: How do I move a non empty directory in Linux?

  1. mv command syntax. $ mv [options] source dest.
  2. mv command options. mv command main options: option. description. …
  3. mv command examples. Move main. c def. h files to /home/usr/rapid/ directory: $ mv main. c def. …
  4. See also. cd command. cp command.

How do I move a full directory in Linux?

The mv command is used to move folders (and files, too) on Linux. The most basic form of the command is to simply specify a source and destination location in your command. You can either use absolute paths or relative paths to the directories. The command above will move /dir1 into /dir2 .

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest