0

Is it possible to use the * operator in Linux randomly instead of in alphabetical order? For example, if I run cat *, it will use cat in alphabetical order. Is it possible for it to run * in random instead of in alphabetical order?

1
  • Short answer: no. Long answer: If you explain what you are actually trying to achieve someone might think of an alternative.
    – DavidPostill
    Mar 24, 2017 at 22:51

1 Answer 1

1

No for the * wildcard itself, as far as I know, but depending on what do you want to do, you can indeed achieve it other ways.

eg. for a a cat *, if you mean going through the file list randomly, you can do

cat $(ls -1 |sort -R)

1

Not the answer you're looking for? Browse other questions tagged .