Simple backups delete an existing backup file if it already exists.There are two types of backups: simple and numbered. This saves a copy of the original file instead of overwriting it. If you use the -b or -backup options, mv renames the destination file if it exists, appending a suffix to its file name. A move only happens if the destination file is older than the source file, or the destination file does not already exist. Treat destination as a normal file, not as a directory.ĭon't overwrite files if they're newer. Move all sources into the directory destination. Specify the file name suffix to be used for all backup files. Remove any trailing slashes from each source argument. If you specify more than one of the options above, only the final option you specify takes effect. Prompt before overwriting an existing file, regardless of the file's permissions. This can be useful if you need to overwrite multiple files whose permissions are read-only if you don't specify -f, you are prompted for every file. See version control methods for details.Īlways overwrite existing files without prompting. Simple backups are created if the variable is not set. Instead, the method specified by the VERSION_CONTROL environment variable is used. Like -backup, but does not accept a backup method. If vcm is omitted, -backup behaves the same as -b (backups are created, using the default version control method). Make a backup of each existing destination file, using the version control method vcm. ![]() Same as the previous syntax, but specifying the directory first, and the source file(s) last: mv -t destination source Options -backup Move source file(s) to a directory named destination: mv source destination Rename a file named source to destination: mv source destination
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |