Find the answer to your Linux question:
Results 1 to 2 of 2
I have a folder named music. From within that folder, i want to be able to do something like rm -r *.jpg and have all the jpg's removed from the ...
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    2

    Need help deleting all jpg files in folder and subfolders.

    I have a folder named music. From within that folder, i want to be able to do something like rm -r *.jpg and have all the jpg's removed from the folder and all subfolders. I can't seem to get the syntax correct for this. Anyone know a quick easy way to do it?

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    You can do something like
    Code:
    $find . -name "*.jpg" -exec rm {} \;

Posting Permissions

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