Finding All MP4 files and Move to New Folder In Linux

So, basically (probablye we have the same problem) I have a (nearly) thousands MP4 files, spreaded accross my Drive. In Windows partition, in Linux Partition etc.

So,this is the time to make a move. I will move all MP4 files that spreaded accross partition to be located in just one folder, /media/data/video or D:/video. And I will do it with Linux.

And this is the command:

[sourcecode]find / -name "*.mp4" -type d -exec /bin/mv {} /media/data/video \;[/sourcecode]

this command will search all files with *.mp4 extension on your directory (you can change it with your desired directory as well) and move all files by executing /bin/mv to new directory /media/data/video.

Finally, all my MP4 files is located in one folder.

Resources: