You are not logged in.

#1 2011-01-19 17:19:51

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

[SOLVED]commandline tool for searching multiple folders & moving files

is there a single tool (ncurses, small set of commands, etc) that would allow me to search a range of folders within a folder (xx1, xx2, xx3, etc inside of /wherever/I/choose) and move the results to another folder?  I'd like to make this effort as quick as possible and I know that commandline is pretty much the fastest option there is for file manipulation.  I'm hoping there's an all in one option because I'd need to move the results from all the folders they were found in to one location at the same time.  Thanks in advance.

Last edited by CPUnltd (2011-01-20 01:35:26)


Help grow the dev population... have your tech trained and certified!

Offline

#2 2011-01-19 17:30:56

clearloon
Member
Registered: 2009-01-07
Posts: 79

Re: [SOLVED]commandline tool for searching multiple folders & moving files

You're looking for the "find" command. Have a read about it and see how you go first.

Offline

#3 2011-01-19 23:09:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]commandline tool for searching multiple folders & moving files

find $searchpath -type f -size -15k -exec mv "{}" $HOME/small/ \;

moves files that are less than 15 KB.

Offline

#4 2011-01-20 01:34:25

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Re: [SOLVED]commandline tool for searching multiple folders & moving files

thank you... I've pretty much figured it out... this is a pretty nice tool! big_smile


Help grow the dev population... have your tech trained and certified!

Offline

Board footer

Powered by FluxBB