だから私は一緒に行き、たくさんのファイルを移動しています
mv /source /dest &
mv /source/* /dest/dest/ &
...
...
それから私は不注意になり、
mv /source/filena* /dest/dest/ *
ああ、神様!^c^c^c^c
[端末コマンドからの応答なし] ここで実際に何が起こっているのですか?
*コマンドの末尾に&(アンパサンド)の代わりに (アスタリスク)を付けるとどうなりますか?
The shell expands the wildcard *. The mv command never sees the wildcard, only the result of the expansion.
The wildcard * expands to the list of files in the current directory in lexicographic order. If the last file is a directory, then all the preceding files (/source.filenafoo, /source/filenabar, /dest/dest, hello) are moved to that subdirectory. If the last file is not a directory, mv complains that “target a.png is not a directory” (or words to that effect).
See What does mv ./* without specifying destination do? for more detailed examples.
コマンド ラインの末尾にあるアスタリスクは、行の他の場所にあるアスタリスクと同じように扱われます。これは、0 個以上の文字に一致するワイルドカードです。具体的には、この場合、*inは、現在のディレクトリ内のすべてのファイルとフォルダーの名前にmv /source/filena* /dest/dest/ *置き換えられます (ドットで始まるものを除く)。mvすべての。