Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    zorin - linux newbie want to find all my music files on computer


    got multiple
    hd and have music files on all so I want to get all of them and (cut and paste) onto 1 HD location so I would like to know what command/s to run to do that

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    The find command can help.
    eg.
    Code:
    find /my/music/folder -name *.mp3 -o -name *.wav  -exec mv {} /my/new/location +

  3. #3
    Quote Originally Posted by gregm View Post
    The find command can help.
    eg.
    Code:
    find /my/music/folder -name *.mp3 -o -name *.wav  -exec mv {} /my/new/location +
    but that looks in a specific location - how do you look in all the computer including all the HDs?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    You could run it for each folder they are in - that would be the most efficient but if they are truly all over the place then:
    Code:
    find / -name *.mp3 -o -name *.wav 2>/dev/null -exec mv {} /my/new/location/ +
    Your drives will have to be mounted of course.
    Sit back have a beer or two cause it will be a while - probably a very long while - before the command finishes. This command moves them - to copy replace mv with cp.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •