move file centos code example

Example 1: linux move everything in a directory to another directory

mv  -v ~/Downloads/* ~/Videos/

Example 2: bash move

# Linux - Bash

# syntax:
mv [options] <source-filepath> <destination-filepath>

# example-1 (fundamental - no switches):
mv "C:\Users\File_Name.txt" "C:\Users\SubFolder\File_Name.txt"

# example-2 (fundamental - with switches):
mv -u "C:\Users\File_Name.txt" "C:\Users\SubFolder\File_Name.txt"

# + ------ + ---------------------------------------------------------- +
# | OPTION |  DESCRIPTION                                               |
# + ------ + ---------------------------------------------------------- +
# |   -f   | force move by overwriting destination file without prompt  |
# |   -i   | interactive prompt before overwrite                        |
# |   -u   | update - move when source is newer than destination        |
# |   -v   | verbose - print source and destination files               |
# | man mv | help manual                                                |
# + ------ + ---------------------------------------------------------- +

Example 3: linux move file

# Linux - Bash

# syntax:
mv [options] <source-filepath> <destination-filepath>

# example-1 (fundamental - no switches):
mv "C:\Users\File_Name.txt" "C:\Users\SubFolder\File_Name.txt"

# example-2 (fundamental - with switches):
mv -u "C:\Users\File_Name.txt" "C:\Users\SubFolder\File_Name.txt"

# Switches
OPTION	DESCRIPTION
mv -f	force move by overwriting destination file without prompt
mv -i	interactive prompt before overwrite
mv -u	update - move when source is newer than destination
mv -v	verbose - print source and destination files