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:

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

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:

Wagiman Wiryosukiro

Petani Sistem Informasi, tukang las plugin & themes Wordpress. Co-Founder SistemInformasi.biz. Saat ini aktif sebagai Developer & kontributor di OpenMandriva Linux.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: