You are not logged in.

#1 2010-12-05 03:37:55

panthe0n
Member
From: Noo Zulund
Registered: 2010-09-27
Posts: 33

Using terminal to find and move files of a certain type. [SOLVED]

I didn't quite know how to search for this. I have a folder called "Downloads" that has a whole bunch of different files in it. Is there a way to select all the files of a certain type in that folder and then move them to another folder within the terminal? Sort of like what you do in Windows when you hold down CTRL and clicked on the files you wanted.

Last edited by panthe0n (2010-12-05 04:00:27)


Registered Linux User #523818.

Offline

#2 2010-12-05 03:55:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Using terminal to find and move files of a certain type. [SOLVED]

You can use find, something like:

find /dir -name "*.jpg" -exec mv {} dirnew/  \;

man find for the details...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2010-12-05 03:56:30

dobbs
Member
From: Pacific NW - USA
Registered: 2010-05-24
Posts: 42

Re: Using terminal to find and move files of a certain type. [SOLVED]

mv  *.ext  /new/place


On the journey since 2006

Offline

#4 2010-12-05 03:58:59

panthe0n
Member
From: Noo Zulund
Registered: 2010-09-27
Posts: 33

Re: Using terminal to find and move files of a certain type. [SOLVED]

dobbs wrote:

mv  *.ext  /new/place

Thank you so much sir!


Registered Linux User #523818.

Offline

Board footer

Powered by FluxBB