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 7961631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:05:54+00:00 2026-06-04T05:05:54+00:00

I encounter one problem about the file system in the shell. what’s difference between

  • 0

I encounter one problem about the file system in the shell.
what’s difference between tmp/**/* and tmp/*?
I make the experiment in my system,
have this directory dir2

dir2
     -->dir1
         -->xx2
     -->ff.txt 

and I run ls dir2/*:

dir2/ff.txt

 dir2/dir1:
 xx2

then I run ls dir2/**/*:

dir2/dir1/xx2

So it means the ** is to ignore this directory(like ignore the dir1),
Can some one help me ?

  • 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-04T05:05:56+00:00Added an answer on June 4, 2026 at 5:05 am

    I think there’s a formatting issue in the question test, but I’ll answer based on the question title and examples.

    There shouldn’t be any difference between a single and double asterisk at any single level of the path. Either expression matches any name, except for hidden ones which start with a dot (this can be changed by shell options). So:

    • tmp/**/* (equivalent to tmp/*/*) is expanded to all names which are nested two levels deep in tmp. The first asterisk expands only to directories and not files at the first level because it’s followed by a slash.
    • tmp/* expands to anything nested one level deep inside tmp.

    To this comes the fact that ls will list contents of directory if a directory is given on its command line. This can be overridden by adding -d option to ls.

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

Sidebar

Related Questions

I have encountered a problem in my application. I have two forms, one that
Looking back at my past projects I often encounter this one: A client or
I have encountered a problem of socket communication on linux system, the communication process
I have encountered a strange problem on one of our machines. It is a
Suppose I have two versions v0.1 and v0.2. In between, there are about 20
For one of our clients, I manage a Magento store. The problem with this
I've encourted a problem recently about cycling between constants of an enum class in
So basically what I have been doing is convert one xml file to a
I am working with Java. I have created one text file. In that text
I found this forum thread in google, but no one here seems to encounter

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.