On Tue, 3 Oct 2017, VY wrote:
Dear All
Yesterday, I was told of this usage of "mv" and I could not figure
out why it would work. So I am sending out my question
Say I am in a directory with 3 sub-directories "a", "b" and "c".
I then type
bash> mv *
Directory "a" and "b" would move under "c".
I re-read the man page for "mv" and nothing says it can do this.
And it did say there needs to be a "source and "destination". From
this command above, there isn't that 2-parameter requirement.
Can anyone explain why this would work? Or is this an undocumented
side-effect for "mv"?
It's a side effect of shell globbing. In your case, the shell expands
mv *
to
mv a b c
So 'c' becomes the destination for 'a' and 'b'.
--
Paul Heinlein
heinl...@madboa.com
45°38' N, 122°6' W
_______________________________________________
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug