Open a terminal and execute this command:

mv -v ~/Downloads/{*,.[!.]*} ~/Videos/

It will move all the files and folders from Downloads folder to Videos folder (including "hidden" files).


To move all files, but not folders:

If you are interested in moving all files (but not folders) from Downloads folder to Videos folder, use this command

find ~/Downloads/ -type f -print0 | xargs -0 mv -t ~/Videos

To move only files from the Download folders, but not from sub-folders:

If you want to move all files from the Downloads folder, but not any files within folders in the Download folder, use this command:

find ~/Downloads/ -maxdepth 1 -type f -print0 | xargs -0 mv -t ~/Videos

here, -maxdepth option specifies how deep find should try, 1 means, only the directory specified in the find command. You can try using 2, 3 also to test.

See the Ubuntu find manpage for a detailed explanation

Answer from Anwar on askubuntu.com
🌐
Linux Foundation
linuxfoundation.org › blog › blog › classic-sysadmin-how-to-move-files-using-linux-commands-or-file-managers
Classic SysAdmin: How to Move Files Using Linux Commands or File Managers - Linux Foundation
September 13, 2022 - The above commands would move /home/jack/testfile to /home/jack/testfile2 – effectively renaming the file. But what if you simply wanted to move the file? Say you want to keep your home directory (in this case /home/jack) free from stray files.
🌐
Linuxize
linuxize.com › home › linux commands › mv command in linux: move files and directories
mv Command in Linux: Move Files and Directories | Linuxize
May 4, 2026 - The mv command (short for move) is used to move and rename files and directories from one location to another.
Discussions

How do I move a file from a different directory to my current directory?
Specify the full path for the file, and your current path can either be typed out fully or represented by a dot . https://man7.org/linux/man-pages/man1/cp.1.html More on reddit.com
🌐 r/linuxquestions
14
6
November 17, 2024
Using mv command to move a file from one folder to another one - Strange example - Unix & Linux Stack Exchange
I'm learning unix commands from a UNIX Tutorial for Beginners at surrey.ac.uk where I found a weird way to move a file. In particular, I have the folder unixstuff in the home directory, inside the More on unix.stackexchange.com
🌐 unix.stackexchange.com
August 26, 2020
ubuntu - Linux command to move a directory into another directory - Stack Overflow
I have a directory dir1 and it contains a lot of files and directories and also I have another directory dir2 and it is empty. And I need a linux command to move the dir1 with all the files and fol... More on stackoverflow.com
🌐 stackoverflow.com
linux - How to move (and overwrite) all files from one directory to another? - Stack Overflow
I know of the mv command to move a file from one place to another, but how do I move all files from one directory into another (that has a bunch of other files), overwriting if the file already exi... More on stackoverflow.com
🌐 stackoverflow.com
People also ask

How do I move hidden files (dotfiles)?
The glob `*` does not match hidden files by default. Use `mv .[!.]* ..?* /destination/` to move dotfiles safely, or use `shopt -s dotglob` in Bash to include dotfiles in glob patterns.
🌐
linuxize.com
linuxize.com › home › linux commands › mv command in linux: move files and directories
mv Command in Linux: Move Files and Directories | Linuxize
How do I move a file without overwriting the destination?
Use the `-n` option: `mv -n file1 /tmp`. If the destination file already exists, `mv` does nothing.
🌐
linuxize.com
linuxize.com › home › linux commands › mv command in linux: move files and directories
mv Command in Linux: Move Files and Directories | Linuxize
Can I undo a `mv` command?
No. The `mv` command does not have an undo feature. If you used `-b`, you can restore the backup file manually. Otherwise, you must move the file back to its original location yourself.
🌐
linuxize.com
linuxize.com › home › linux commands › mv command in linux: move files and directories
mv Command in Linux: Move Files and Directories | Linuxize
🌐
GeeksforGeeks
geeksforgeeks.org › linux-unix › mv-command-linux-examples
mv Command in Linux - GeeksforGeeks
This command moved file "name = `geeksforgeeks`" to the destination "name = "/home.jayeshkumar/jkj/". The mv Command allows moving multiple files like source_file_name_1, source_file_name_2... simultaneously to a specified Destination_path in ...
Published   January 23, 2026
🌐
IBM
ibm.com › docs › ssw_aix_71 › osmanagement › HT_move_rename_files.html
Moving and renaming files (mv command)
Use the mv command to move files and directories from one directory to another or to rename a file or directory. If you move a file or directory to a new directory without specifying a new name, it retains its original name.
Find elsewhere
Top answer
1 of 1
46

TL;DR

This forces the destination to be a directory that already exists or the command to fail without effect and is used as a fail-safe.


The meaning of .

Every directory in typical Unix/Unix-like filesystems include two special directories: one referencing the directory where it is: . and one referencing the parent directory of where it is: .. (allowing to move back in the hierarchy of directories). They are relative to where they are found. So the directory . inside a directory named backups references backups. To tell it otherwise, when there's a directory named backups, backups/. is equivalent to backups.


Different behaviors with the source or destination being a file or directory

  • If the directory exists, the two commands will have the same effect: when the target is a directory mv will move source(s) to that directory. That's the expected outcome.

  • If the target backups is a file instead of the directory:

    • 1st case will fail with the error Not a directory
    • 2nd case will rename Caiti.bak and overwrite backups
  • If the target doesn't exist:

    • 1st case will fail with No such file or directory
    • second command will rename the file Caiti.bak into the file backups, leading to the previous case and possible loss of data the next time it happens.

That's good practice to append /. to a directory target supposed to be existing and abort a script at an error from this.

All these cases would work the same when only appending / if the source is a file rather than a directory.

If we can't assume this, this example where the source is a directory:

mv somedirectory targetnothere/

would not fail (and somedirectory will be renamed instead of being put into targetnothere or abort). The extra . will make this case fail too:

$ mv somedirectory targetnothere/.
mv: cannot move 'somedirectory' to 'targetnothere/.': No such file or directory
🌐
Red Hat
ftp.kh.edu.tw › Linux › Redhat › en_6.2 › doc › gsg › s1-managing-working-with-files.htm
Copying, Moving and Renaming Files and Directories
Don't want to overwrite the file? Now is the time to press N and Enter. To move files, use the mv command (man mv), which is similar to the cp command, except that with mv the file is physically moved from one place to another, instead of being duplicated, as with cp.
🌐
University of Connecticut
www2.math.uconn.edu › ~vince › MathDoc › GSGuide › s1-managing-working-with-files.html
Copying, Moving, Renaming, and Deleting Files
If you want to move a file out of your home directory and into another directory, type the following (you'll need to be in your home directory): Alternatively, the same command using absolute pathnames looks like mv sneakers.txt /home/newuser /home/newuser/tigger.
🌐
Opensource.com
opensource.com › article › 21 › 8 › move-files-linux
Move files in the Linux terminal | Opensource.com
The mv command by default does exactly as it's told: it moves a file from one location to another. Should a file with the same name already exist in the destination location, it gets overwritten.
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 6 › html › security-enhanced_linux › sect-security-enhanced_linux-maintaining_selinux_labels_-moving_files_and_directories
5.9.2. Moving Files and Directories | Security-Enhanced Linux | Red Hat Enterprise Linux | 6 | Red Hat Documentation
As the Linux root user, run the mv file1 /var/www/html/ command to move file1 to the /var/www/html/ directory. Since this file is moved, it keeps its current user_home_t type: ~]# mv file1 /var/www/html/ ~]# ls -Z /var/www/html/file1 -rw-rw-r-- user1 group1 unconfined_u:object_r:user_home_t:s0 ...
🌐
TutorialsPoint
tutorialspoint.com › article › how-to-move-a-file-group-of-files-and-directories-in-linux
How to move a file, group of files, and directories in Linux?
July 1, 2021 - The mv (move) command is used to move one or more files or directories from one location to another in Linux/Unix systems. Unlike copying, the mv command transfers files by removing them from the source and placing them at the destination.
🌐
Reddit
reddit.com › r/linuxquestions › what is the best way to move files if they are not already in the destination folder?
r/linuxquestions on Reddit: What is the best way to MOVE files IF they are not already in the destination folder?
March 23, 2023 -

Hi, all.

I have about 6-7TB worth of data that I need to merge. I've been merging manually because I've lost trust in rsync due to various mishaps (I'm sure it was my fault) and data being duplicated or put in the wrong place.

I'm at a point where I pretty much have everything in 2 folders that should be pretty similar but I want to merge everything now.

My folders look like this:

Source: /mnt/myDrive/DATA

Destination: /media/user/easystore/DATA

I want to check if the files/folders in myDrive/DATA exist in easystore/DATA before moving them so I save time as the folders are 6-7TB in size.

I tried using Grsync with the following options:

  • Preserve Time

  • Verbose

  • Ignore Existing

  • Show Transfer Progress

  • Size Only

  • Protect Remote Args

  • Additional Options: --remove-source-files

I ran this job on a 1.2TB folder going from myDrive/DATA (internal SATA) to easystore/DATA (USB) and it took about 3 hours to complete. I think it did what I want as overwriting 1.2TB would take much longer than 3 hours but am looking for confirmation/a better way before I tackler the rest of the data.

Any help is greatly appreciated - thanks in advance!

🌐
Medium
medium.com › towardsdev › moving-and-renaming-files-directories-in-linux-f60028303b5d
Moving and Renaming Files & Directories in Linux | by Nakul Mitra | Towards Dev
December 1, 2025 - Moving and Renaming Files & Directories in Linux The mv command in Linux is one of the most commonly used file-management commands. It is used for moving files, moving directories, and renaming files …
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-newbie-8 › why-won't-it-let-me-copy-or-move-a-file-from-one-directory-to-another-615630
Why won't it let me copy or move a file from one directory to another?
January 22, 2008 - Ok. I have some programming experience but it's all in the R language. I'm trying to self teach myself C++ here and I have been messing around with