When invoking a program with a wildcard, then the shell you're using will try to expand this wildcard and give the expanded filenames as arguments to the executable. If it cannot be expanded, the shell gives the wildcards as filenames to the process.
See the following strace
output (the files exist):
user@host:~$ mv test* /tmp/
execve("/bin/mv", ["mv", "test", "test1", "test2", "test3", "/tmp"], [/* 19 vars */]) = 0
Now, this strace
output (no file matching the wildcard exists).
user@host:~$ mv test* /tmp/
execve("/bin/mv", ["mv", "test*", "/tmp/"], [/* 19 vars */]) = 0
When moving a file with mv
, the program mv
first tries to get the status of the file. That's been done with a syscall stat
(see man 2 stat
). If the status of the file (or multiple files in your case) cannot be gathered, the mv
process cannot continue.
In the second case the stat syscall fails:
lstat("test*", 0x7fff20d26490) = -1 ENOENT (No such file or directory)
To cut a long story short: No files exist that match the statement ACQ*.err
.
ACQ*.err
? – Adrian Frühwirth Jun 10 '14 at 06:36