To move multiple files from one folder to another in Unix, use the mv command with either a wildcard pattern or explicit file names. The basic syntax is mv source_files destination_directory.
For moving all files matching a pattern, use wildcards: mv *.txt /path/to/destination/ moves all text files from the current directory. You can also use patterns like mv file{1,2,3}.txt /destination/ to move specific numbered files.
To move multiple explicitly named files, list them: mv file1.txt file2.txt file3.txt /destination/
For moving all files in a directory regardless of name, use: mv /source/* /destination/
If the destination directory doesn't exist, create it first with mkdir -p /destination/
Useful options include:
-i: Prompts before overwriting existing files-f: Forces overwrite without prompting-v: Verbose mode, shows what's being moved
For example: mv -v *.log /var/logs/ moves all log files and displays each operation.
To move files recursively from subdirectories, use find with mv: find /source -type f -name '*.txt' -exec mv {} /destination/ \; moves all text files from all subdirectories.
Always double-check your source patterns and destination path before executing, especially with -f flag, since mv removes the source files after moving them.