Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8136619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:49:09+00:00 2026-06-06T10:49:09+00:00

I have a mp3 Player. I have connected it to my PC which has

  • 0

I have a mp3 Player. I have connected it to my PC which has Ubuntu as an OS.
I want to delete all the files that are not .mp3.

I know that for deleting them the command is rm *.mp3, but what’s the combination for negating this?
I’ve tried: rm ^.mp3, ^mp3 ^[mp3], but they didn’t work! Any suggestion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T10:49:11+00:00Added an answer on June 6, 2026 at 10:49 am

    Assuming you are using bash and extglob is set, you should be able to:

    rm !(*.mp3)
    

    I would try a test with ls before blindly running that command:

    ls !(*.mp3)
    

    To check the value of extglob:

    shopt extglob
    

    And to turn it on, if necessary:

    shopt -s extglob
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a folder on my web server that has hundreds of mp3 files
I have mp3 files on my server that I want to be accessed via
i have swf mp3 player that i like to load mp3 files from local
I have an mp3 player that sends MCI commands to play pause/ff/rw/stop the audio
I want to have a program that reads metadata from an MP3 file. My
I have a website www.askvioletnow.com. I added a flash mp3 player that plays a
I want to make a custom mp3 player in flash which can play 2
I have a list of mp3 files which I automatically build together to different,
I am building a MP3 player for iOS that plays audio files hosted on
hi i have created a new mp3 player app for my owm. In that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.