Questions tagged [globbing]

Globbing is a way to match sets of paths without explicitly specifying paths. For example, the * glob would match all paths in a directory.

Filter by
Sorted by
Tagged with
9 votes
1 answer
6k views

Does a wildcard inside double-quotes glob? [closed]

On a "standard BASH" does a wildcard inside double-quotes glob? For example: $ touch abc $ ls "*abc*" would that, or wouldn't that work on bash? I was told Ubuntu shipped with a bash variant that ...
Matt's user avatar
  • 767
1 vote
1 answer
390 views

Is it possible to use brace expansion and globbing together?

Say I wanted to copy the .ssh/authorized_keys file in each user's /home directory to /tmp (for whatever reason). I figured I could use globbing and brace expansion to do this quickly, but I ran into ...
Ziggy's user avatar
  • 906
5 votes
2 answers
9k views

"ls" or regex is case insensitive?

In bash, I tried ls [a-z]* and expected to list all the files with filename starts with small case alphabet. But why the files with name starts with big case alphabet are also shown? >ls [a-z]* ...
zhanwu's user avatar
  • 973
41 votes
5 answers
14k views

How to expand * on Bash command line

I understand that if you type ls * it is actually expanded to ls a b c when the current directly has files a, b and c. I was wondering if there is a way to expand this before I hit enter. Similar to ...
bramp's user avatar
  • 528
28 votes
2 answers
7k views

Does bash's * match files in alphanumeric order?

I want to concatenate a bunch of files together in filename order. Is it safe to assume that this will give me them in alphanumeric order? cat * i.e. the same order that ls gives.
therefromhere's user avatar
22 votes
7 answers
44k views

Will rm -rf * remove all files/folders in the current directory?

Will rm -rf * remove all files/folders in the current directory ? I want to make sure the wildcard * won't move up in upper directories and erase all my filesystem. :D I remember doing chmod 777 .* -...
Olivier Lalonde's user avatar

1
2