I am at the path:
/myuser/downloads/
And I create a sub folder:
/myuser/downloads/new
Now I want to move all files and folders/sub-folders in the downloads folder to the sub-folder.
how can I do this?
I tried:
mv -R *.* new/
But move doesn't take the -R switch it seems.
Best Answer
The command
should do the trick. If it doesn't work, run
shopt -s extglob
first.To also move hidden files/directories (that beginning with a dot), run also
shopt -s dotglob
first.So, to sum up:
(it is always better to unset
dotglob
to avoid bad surprises).