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

  • Home
  • SEARCH
  • 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 8893489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:15:38+00:00 2026-06-14T23:15:38+00:00

How can I remove all dirs that start with a prefix, So I have

  • 0

How can I remove all dirs that start with a prefix, So I have something like this

  • xyzdirblah
  • xyzdir2
  • xyzdir3
  • xyzdir4
  • ..more

want to do via adb shell , android

  • 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-14T23:15:40+00:00Added an answer on June 14, 2026 at 11:15 pm
    rm -rf xyzdir*
    

    rm is the command to delete things.

    -r means recursively delete directories.
    -f means don’t ask questions, and don’t complain.
    -rf means both of those things together.

    xyzdir* expands to the names of files that start with “xyzdir” (including directory names, since in Unix-like systems — including Android — directories are really just a special kind of file.)

    If there are nondirectory files with the same prefix, like “xyzdir.txt”, which you don’t want to remove, you have to be more careful:

    for i in xyzdir*; do [ -d $i ] && rm -rf $i; done
    

    This loops over every file-or-directory with a name starting with “xyzdir” (the for i in part), checks whether it is a directory (the [ -d $i ] part), and if so (the && part), removes it recursively (the rm -rf $i part).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have string like this: G:\Projects\TestApp\TestWeb\Files\Upload\file.jpg How can I remove all text before Files
Is there anyway or any addin for VS2010 that can remove all the comments
I have a <ul> element. How can remove all the <li> elements inside it,
I see that I can remove all of the UIPageViewController gestures, but what if
Is there an Awk or Perl one-liner that can remove all rows that do
How can I remove all triggers from my tables. I have many tables, but
How can I remove all default styling from error message? I need this document
I have a list of tuples that look like this. [ [(1,True),(2,True)] , [(3,False),(4,False),(5,False)]
How can I remove all non alphanumeric characters from a string in PHP? This
Is there any tool / Eclipse plugin that can remove all JavaDoc comments in

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.