beta.blog

Linux: Move all files from subdirectories to current directory

by on Jul.29, 2013, under Linux (Ubuntu)

I’ve had many folders containing different files and wanted to move all of these to the current directory without having to enter each path seperately and moving the files manually. So I simply executed the following bash one-liner:

mv Pinky.and.Brain.S01E*/* .

It moves all files from all of these subdirectories to the current directory.

And in order to delete the (now empty) folders I executed the following command:

rm -r Pinky.and.Brain.S01E*/

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!