Search code examples
bashmv

Move multiple files with wildcards


I'd like move multiple files with wildcards like

mv log.* ./log
mv: rename log to ./log/log: Invalid argument

the log.* are listed as:

ls log*
log.md  log.txt

How could I move them at once?


Solution

  • The error message basically says, that you can't move the log directory into itself.

    Be more specific with your source file names, for example include the dot.

    mv log.* ./log