0

I have a directory structure like this:-

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

I need all subdirectories to move up 1 level so they are off the root, can someone please help me with the correct syntax from a shell prompt please.

Thanks

Jonathan

3 Answers 3

2
cd /root/directory/
mv ./subdirectory* ../
1
  • Thanks, is there a way to do it without having to specify the names of the subdirectories as there are about 50. Thanks Jonathan
    – Anonymous
    Jan 3, 2010 at 9:54
2
mv /root/directory/* /root/
0

Two good references you should bookmark:

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

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

These will help you immeasurably in your bash-fu adventures.

You must log in to answer this question.