将子目录上移一层以在Linux中创build根目录

我有这样的目录结构:

/root/directory/subdirectory1 /root/directory/subdirectory2 /root/directory/subdirectory3 /root/directory/subdirectory4 

我需要所有的子目录向上移动1级,所以他们脱离根目录,请有人可以帮助我在shell提示符正确的语法。

谢谢

乔纳森

 cd /root/directory/ mv ./subdirectory* ../ 
 mv /root/directory/* /root/ 

两个很好的参考你应该书签:

http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html

http://tldp.org/LDP/abs/html/index.html

这些将帮助你在bash-fu冒险中无法衡量。