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?
-
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
Add a comment
|
1 Answer
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)