[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Glob star pattern does not match files beginning with a
From: |
Evan Gates |
Subject: |
Re: [Help-bash] Glob star pattern does not match files beginning with a period |
Date: |
Mon, 13 Jul 2015 14:55:19 -0700 |
On Mon, Jul 13, 2015 at 2:50 PM, Michael Convey <address@hidden> wrote:
>
> Therefore, you need two arguments to the ls command to accomplish what you
> are trying to do, as follows:
>
> ls -d * .[!.]?*
>
> The first argument * matches all regular files. The second argument .[!.]?*
> matches all hidden files by expanding into every filename that begins with
> a period, does not include a second period, contains at least one
> additional character, and may be followed by any other characters.
Almost. You want .[!.]* and ..?* so you don't miss files like ..foobar
> Your original command will work if you set the dotglob option via "shopt
> -s dotglob".
But this is probably the better option when using bash.
-emg
- [Help-bash] Glob star pattern does not match files beginning with a period, David Niklas, 2015/07/13
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/13
- Re: [Help-bash] Glob star pattern does not match files beginning with a period,
Evan Gates <=
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/13
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/15
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Greg Wooledge, 2015/07/15
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Eric Blake, 2015/07/15
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/15
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Peter West, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Greg Wooledge, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Eric Blake, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Eric Blake, 2015/07/16