Bash: How can I move all the content in the folder up to one level?

Kit Ho picture Kit Ho · Apr 1, 2012 · Viewed 12.7k times · Source

How can I move the whole folder of _vim into ~/.vim?

$ mv ~/.vim/_vim/ ~/.vim
mv: `/home/kithokit/.vim/_vim/' and `/home/kithokit/.vim/_vim' are the same file

I cannot do that. Basically what I want to do is just move all the contents inside _vim folder up to one level, which is in ~/.vim/

Answer

Dunes picture Dunes · Apr 1, 2012
mv ~/.vim/_vim/* ~/.vim

Bash expands the * such the command now reads

mv ~/.vim/_vim/file_1 ... ~/.vim/_vim/file_n ~/.vim