This question already has an answer here:
- “mkdir foo; svn mv * foo” 3 answers
Anytime I want to move thousands of files to a new folder, I always encounter the same problem.
> mkdir my_folder
> mv * my_folder
mv: cannot move 'my_folder to a subdirectory of itself 'my_folder'
While I think that the error above is harmless (is it?) I am wondering if there is a way of avoiding it.
In case it matters, I am interested in a solution in zsh or one that works well across various shells.
find -type f -exec mv {} folder \;– ott-- Jan 31 at 19:00