The path structure of the files on my server is similar to that shown below,
/home/sun/sdir1/mp4/file.mp4 /home/sun/collection/sdir2/mp4/file.mp4
I would like to move the files of "mp4" into one level up(into sdir1 and sdir2 respectively)
So the output should be,
/home/sun/sdir1/file.mp4 /home/sun/collection/sdir2/file.mp4
I have no idea to do this, so not tried yet anything...
There are different ways to solve your problem
If you just want to move those specific files, run these commands:
If you want to move all mp4 files on those directories (sdir1 and sdir2), run these commands:
Edit:
Create a script and name it and edit it with your favorite editor (nano, vim, gedit, ...):
The script file content is:
Save the file and give it execute permissions:
And execute it: