English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Der Linux-Befehl mv (gesprochen: move file) wird verwendet, um Dateien oder Verzeichnisse umzubenennen oder in andere Positionen zu verschieben.
mv [Optionen] Quelle Ziel mv [Optionen] Quelle... Verzeichnis
Parameterbeschreibung:
mv Parameter Settings and Run Results
Command Format | Run Results |
---|---|
mv source_file(file) dest_file(file) | Rename the source file name source_file to the target file name dest_file |
mv source_file(file) dest_directory(directory) | Move the file source_file to the target directory dest_directory |
mv source_directory(directory) dest_directory(directory) | The directory name dest_directory already exists, move source_directory to the directory name dest_directory; if the directory name dest_directory does not exist, rename source_directory to directory name dest_directory |
mv source_directory(directory) dest_file(file) | Error |
Rename file aaa to bbb:
mv aaa bbb
Move the info directory into the logs directory. Note that if the logs directory does not exist, the command will rename info to logs.
mv info/ logs
For example, to move /usr/w3codebox Move all files and directories under to the current directory, the command line is:
$ mv /usr/w3codebox/* .