LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2013, 05:36 PM   #1
cdrobsonjr
Member
 
Registered: Aug 2002
Location: Friendsville, TN
Distribution: Fedora Core 2
Posts: 44

Rep: Reputation: 15
Question moving directory structure up one level - how?


I wanted to install phpBB3 on a Debian Wheezy system, so I downloaded it to my Desktop, created a new directory which I called /usr/share/phpbb, and moved my downloaded (zipped/tarred) file to it. I then did an bunzip2, followed by a tar xvf. That created a whole file structure, which come to find out is all under a new folder called phpBB. I want to move the whole thing up one level so that it comes to live at /usr/share/phpBB3, thus eliminating the needless extra level I created when I made the directory phpbb.

What are the steps (please spell out in painful detail) to accomplish this?

Thank you

Doug
 
Old 06-29-2013, 05:44 PM   #2
jazz5150
LQ Newbie
 
Registered: Jun 2013
Location: NL
Distribution: Kali-Linux, Debian
Posts: 20

Rep: Reputation: 15
From the /usr/share/phpbb/phpBB

Do:

mv * ../

That is as difficult as I can make it..

Cheers

Last edited by jazz5150; 06-29-2013 at 05:46 PM.
 
Old 06-29-2013, 06:59 PM   #3
Z038
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 835

Rep: Reputation: 165Reputation: 165
If there are any files that start with a dot, you'll have to move those with a second command. You also said you wanted to rename directory phpbb to phpBB3, so here is the whole thing:

Code:
# cd /usr/share/phpbb
# mv phpBB/* .
# mv phpBB/.* . 

Note: you'll get errors like these when you enter the above mv, but you can ignore them.
mv: cannot move 'phpBB/.' to './.': Device or resource busy
mv: cannot move 'phpBB/..' to './..': Device or resource busy

# rmdir phpBB
# mv ../phpbb ../phpBB3
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Modify the directory entry structure of a directory to show manipulated data shreyas08 Linux - Newbie 1 12-13-2011 06:34 AM
Accessing and performing operations on Base level kernel structure ankur0921 Programming 5 01-26-2011 05:58 AM
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 10:18 AM
Home Jail Folder Structure like Gobolinux Directory Structure luispt Linux - General 3 07-26-2008 07:46 PM
Linux: get low-level file structure information in userspace using C sam_vde Programming 6 07-25-2008 05:42 PM


All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration