Using terminal to move files in a specific directory to a new location.

Joined
Dec 31, 2012
Messages
3
Reaction score
0
Points
1
Hello, there guys. This is my first post here, and I just wanted to thank you all for the valuable information you have provided to me in the past prior to my registration.

Now, I have something that perplexes me. I am not a very proficient terminal user. In fact, I hardly use it at all, but I know it is a very powerful low level manipulation tool. I have read other forum posts regarding how to do this sort of thing, but after "cd"ing to the folder location where I perform a find a move operation, it tells me that I'm not using find properly.

What I am attempting to do is move all files from a specific directory into a new directory that have the filetype extension .flac. Here is the command the the error message I have been using and getting, respectively:
find -name *.flac -exec utility mv{} /Desktop/Beethoven \;
find: illegal option -- n
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

Again, I had already cd'd to the directory I need to move the files from. There are about 100 separate folders I am attempting to search at the directory level I'm at, each representing a different disc of music.

Okay, let me be really situationally specific. I downloaded 100 discs worth of music into my iTunes folder. The album name is "Ludwig van Beethoven - Complete Works [Brilliant Classics 100 CD Box] 2" and the full directory location to the album is "/Users/thomasjeffinger/Music/iTunes/iTunes Media/Music/Ludwig van Beethoven - Complete Works [Brilliant Classics 100 CD Box] 2". I want to search this folder's contained within this folder for files containing .flac extensions, and move them to a folder on my desktop called "Beethoven". What command in terminal would use to do that?

Thanks!

- Alpha Spartan A
 
Joined
Feb 26, 2010
Messages
2,116
Reaction score
123
Points
63
Location
Rocky Mountain High, Colorado
Your Mac's Specs
1.8 GHz i7 MBA 11" OSX 10.8.2
your find is wrong
Try this first
Code:
find . -name '*.flac' -print

That should show you all the flac files in your directory

I believe it should be

Code:
find . -name '*.flac' -exec mv {} /where/you/want/to/move/to \;
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top