move files into directory linux code example

Example 1: 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 2: move directory with files linux

how to move a folder/Directory in Linux with files

#sytex
mv /path/to/source /path/to/destination

#example
mv Reports tools/Reports

Example 3: move one foile/folder to another ubuntu

//simple example where site-available is initial folder and site enabled is the folder where we transfer the file 000-default.conf
sudo mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-enabled/