Move a directory to a new location.

Section: Copy, Move, Rename

Move directory

bash
bash
mv logs /var/archive/logs

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Copy, Move, Rename
Copy directory recursively with preserved metadata
Copy directory trees while preserving timestamps and mode when possible.
OpenIn sheetbashsame section
Rename file
Rename a file or move it within the same filesystem.
OpenIn sheetbashsame section
Copy interactively
Prompt before overwriting an existing file.
OpenIn sheetbashsame section
Install file with mode
Copy a file and set destination permissions in one step.
OpenIn sheetbashsame section
Create nested directories
Create a directory path including missing parents.
OpenIn sheetbash1 tag match
Remove empty directory
Delete a directory only if it is empty.
OpenIn sheetbash1 tag match