Co robi MV użycie. Konsola determine the result (third column): Source Target Result File name.

Czy przydatne?

Polecenie mv

Wykonanie, użycie: Move or rename files and directories. The source (first column) and target (second column) determine the result (third column):

Source

Target

Result

File

name (nonexistent)

Rename file to name.

File

Existing file

Overwrite existing file with source file.

Directory

name (nonexistent)

Rename directory to name.

Directory

Existing directory

Move directory to be a subdirectory of existing directory.

One or more files

Existing directory

Move files to directory.

The mv command is often aliased as mv -i in the .bashrc file, especially for the root account, to prevent inadvertently overwriting files

Opcje wykonania mv w konsoli

-b

Back up files before removing.

--backup[=type]

Like -b, but can take an argument specifying the type of version-control file to use for the backup. The value of type overrides the VERSION_CONTROL environment variable, which determines the type of backups made. The acceptable values for version control are:

t, numbered

Always make numbered backups.

nil, existing

Make numbered backups of files that already have them, and make simple backups of the others. This is the default.

never, simple

Always make simple backups.

none, off

Never make backups.

-f, --force

Force the move, even if target file exists; suppress messages about restricted access modes. Same as --reply=yes.

--help

Print a help message and then exit.

-i, --interactive

Query user before removing files. Same as --reply=query.

--reply=prompt

Specify how to handle prompt if the destination exists already. Possible values are yes, no, and query.

--strip-trailing-slashes

Remove trailing slashes from source paths.

-S suffix, --suffix=suffix

Override the SIMPLE_BACKUP_SUFFIX environment variable, which determines the suffix used for making simple backup files. If the suffix is not set either way, the default is a tilde (~).

--target-directory=dir

Move all source files and directories into the specified directory.

-u, --update

Do not remove a file or link if its modification date is the same as or newer than that of its replacement.

-v, --verbose

Print the name of each file before moving it.

--version

Print version information and then exit.

Przykłady mv działanie w Słownik polecenie M

Przykład MV użycie :
Jak użyć System administration command. Format device as an MS-DOS filesystem. You may specify the number of blocks on the device or allow mkdosfs to guess co znaczy.
Przykład MV użycie :
Jak użyć temporary filename for use in a script. The filename is based on the specified template, which may be any filename with at least six Xs appended (e.g., /tmp/mytemp.XXXXXX ). mktemp replaces the Xs krzyżówka.
Przykład MV użycie :
Jak użyć administration command. Prepare swapspace on device : a disk partition or a prepared file. This command can create old and new style swap areas. The older style provides backward compatibility with 2 co to jest.
Przykład MV użycie :
Jak użyć file merge, putting the result in file1 . The effect is easiest to understand if file2 is considered the original version of a file, file3 an altered version of file2 , and file1 a later altered słownik.
Przykład MV użycie :
Jak użyć tools for working with MS-DOS files and filesystems, especially for accessing files on floppy disks without mounting them as Unix filesystems. The various commands are mattrib , mbadblocks , mcat czym jest.