What is the Fastest Way to Move Bulk Images in Linux/Ubuntu?


Images are significant as they help to understand a concept, capture a particular moment, and help to retain a concept in mind. There is a famous saying that “A picture is worth a thousand words”. There might be a requirement to move multiple images in Linux/Ubuntu systems. There are several command line utilities and GUI (Graphical User Interface) options available for renaming moving images in bulk.

This article will demonstrate different ways to move images in bulk in Linux/Ubuntu systems and determine the fastest way to move images in bulk. This article is organized as follows:

  • How to Move Images in Bulk via Mv Command?
  • How to Move Images in Bulk via the Rsync Command?
  • How to Move Images in Bulk via Cp Command?
  • How to Move Images in Bulk via GUI?
  • Bonus Tip: How to Move Images in Bulk via Archives?

This article will demonstrate the bulk moving of five hundred (500) images from ~/Pictures/Screenshots to ~/Documents/Images via mv, rsync, cp, and GUI. To verify the image count, run the following command:


Where the wc(word count) command returns the line count.

The above output returns 501, as it counts the 500 images and an extra line representing a new line. Alternatively, the source folder can be seen via GUI below:

In the following sections, these methods of moving images in bulk are discussed. Let’s get started.

How to Move Images in Bulk via Mv Command?

The “mv” (move files) command is used to move and rename directories/files within the File system in Linux/Ubuntu. To move images in bulk, navigate to the path of the images and run the following command:

$ mv *.png ~/Documents/Images

The above output indicates that 500 images were successfully moved from ~/Pictures/Screenshots to ~/Documents/Images.

Additionally, the mv performs even better if all files are added to a directory and moved rather than moving bulk files one by one.

How to Move Images in Bulk via the Rsync Command?

The rsync is used to move and synchronize files within a local system or between remote systems. The rsync file employs a delta-transfer algorithm making the rsync command highly efficient while moving/synchronizing files remotely as it only transmits the differences between the files rather than moving all the files, resulting in fast file transfer and conserving bandwidth. On the contrary, rsync is a bad choice while moving files in local storage as it results in a lot of background work. To move images in bulk via the rsync command, run the following command:

$ rsync -av *.png ~/Documents/Images

The output of rsync commands lists all the files that are being copied:

To verify the moved files, run the following command:

$ ls -l ~/Documents/Images | wc -l

The above output indicates that 500 images were successfully moved from ~/Pictures/Screenshots to ~/Documents/Images.

How to Move Images in Bulk via Cp Command?

The cp (copy) is used to copy a file/directory within the File system in Linux/Ubuntu. To move images in bulk via the cp command, run the following command:

$ cp *.png ~/Documents/Images

The above output indicates that 500 images were successfully moved from ~/Pictures/Screenshots to ~/Documents/Images.

Although the cp command moves the files, it keeps a copy of files/directories in the source while copying in files/directories at the destination. Thus, the cp command is not efficient for moving files.

How to Move Images in Bulk via GUI?

The most convenient way to move images in bulk is via GUI for Linux/Ubuntu beginners. To move images in bulk via GUI, first, navigate to the path of the images. Then, select all images with a mouse or a keyboard and then press “Move to” from the drop-down menu:

This will open a new “Select Move Destination” window. Choose the path to move the images and press the “Select” button as shown below:

The selected images will be moved to the selected path. To verify, we can access the “Images” Directory:

The above output indicates that 500 images were successfully moved from ~/Pictures/Screenshots to ~/Documents/Images.

Bonus Tip: How to Move Images in Bulk via Archives?

Images in bulk can be compressed to archive and moved to a destination. Moving a compressed archive is faster and it conserves transmission bandwidth. However, compressing bulk images and moving is only efficient while moving to a directory residing on another system. To move images in bulk via the compressed archives, first compress the archive by the following command:

$ zip Screenshots.zip Screenshots

Then move the compressed archive by mv command:
$ mv Screenshot.zip ~/Documents/Images

The above output indicates that the compressed archive containing 500 images was successfully moved from ~/Pictures to ~/Documents/Images.

There are many compression techniques. The above example demonstrates compression via zip compressed archive file format, but a directory can be compressed via other compressed archive file formats like tar, rar, 7s, zip, etc. More information about compressing files/folders to archives can be found at:

Conclusion

Images can be moved in bulk via CLI utilities such as mv, rsync, and cp as well as via GUI. Although these methods do the job, the mv command is the most efficient way to move images in bulk in Linux/Ubuntu if the two directories reside on the same system. Alternatively, if the two directories reside on different systems, then rsync performs better than mv. This article demonstrates different ways to move bulk images in Linux/Ubuntu systems and determines the fastest way to move bulk images.

Print Friendly, PDF & Email