[Solved] How to move a large directory from "/home" to "/"

Discussions about using Linux guests in VirtualBox.
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

[Solved] How to move a large directory from "/home" to "/"

Post by Phil B. »

Simple question - how do I move an "app" directory (/home/app) from "/home" to "/" ?

"/home/app" is 70G in size.
"/" has only 25G free.

The guest is Oracle Linux 6.8 VirtualBox version 5.1.22

I took all the disk defaults during installation. That's why it put the 70G in "/home" rather than "/". Wish I'd known it was going to do that.

Thanks.
Last edited by Phil B. on 18. Sep 2017, 14:58, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to move a large directory from "/home" to "/"

Post by Perryg »

Two questions.

1) what is the host?
2) what exactly do you mean when you say app, the actual program or the location of the guest?
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

1. Host is Windows 8.1
2. "App" is just a data directory which I created under "/home" in the guest Linux 6.8.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to move a large directory from "/home" to "/"

Post by Perryg »

Then this would be a Linux question, better asked at the guest OS's forum. Do you even have read/write permission to "/" (root)
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

Yes, I have root login, so permissions are not a problem.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to move a large directory from "/home" to "/"

Post by Perryg »

Like I said this is not a VirtualBox question. Use a search engine to see what commands you need to use to move files in Linux (mv) See link below.
https://www.linux.com/learn/how-move-fi ... anagers%20
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

It is a VirtualBox question, because it requires a knowledge of VirtualBox to brainstorm the options to get out of this mess, for example maybe the "Create a CD" feature of VirtualBox to export and then import into a new VirtualBox (correctly configured this time, using the "Custom" disk option). I know how to move files just fine. The problem is that VirtualBox created the majority of the disk size in the "home" directory, and so now how do I get it from there to where I need it (the "/" directory).
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to move a large directory from "/home" to "/"

Post by Perryg »

Everything you have posted so far has to do with the Linux guest ( Linux guest forum ). The VirtualBox program which you installed on the Windows host is all that VirtualBox configures. Since Windows does not use "/" (root) then that makes it a Linux question. Now if you are wanting to move the guest that resides on the host to a different location that is a different question. So You have to better explain what the real problem is so we can advise you.
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

The question is about how to *use* VirtualBox, not how to configure it. Since you don't understand the original question, then the next question is "What's the easiest way to salvage the data, ie. the contents of the /home/app directory, so that it can be placed in the "/" directory of the same Linux VM, or if not there, then in the "/" directory of a new Linux VM."
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to move a large directory from "/home" to "/"

Post by Perryg »

You're right I don't understand and at this junction I still don't. Moving data from one point to another within a guest has nothing to do with VirtualBox. Even moving data from the guest to another guest has nothing to do with VirtualBox with the exception that you need to get the data to a common place to hold until the move. Maybe you don't understand what VirtualBox really does, not sure, but it creates a condition where you have two separate machines running on one computer. It is not a app like word where you can simply copy the data from one location to another. You can use shared folders to get the data to the host where you can then place on a different machine, but it is not needed to do this from within the same guest ( PC ). You can also use a usb drive to move the data ( just like on metal ) to do the same thing when moving to a different machine.

If this still isn't what you really want then I don't think I can help you and will let someone else try to figure this out. Maybe they will have better luck in understanding what I can't.
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

Someone else needs to chime in. You're making it way too complicated.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: How to move a large directory from "/home" to "/"

Post by Martin »

Virtualbox has nothing to do with what you do with files inside your Linux guest VM.
It just has created a single big file on your Windows host which represents the whole virtual harddisk.
What you do to move files around inside a (virtual) Linux installation has no relation with Virtualbox, it woks the same as with any other Linux installation, virtual or physical.
Maybe you can get better/more help in a forum for Oracle Linux 6.8 because most of us Virtualbox users here don't have experience with Oracle Linux.
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

Thanks Martin. I wasn't aware there is so little experience with Oracle Linux here.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to move a large directory from "/home" to "/"

Post by Perryg »

Well I do have OEL experience and I already told you what to do. You use the mv command and the example is in the link I already sent you. So the next question I have is did you try that and what happened?
Phil B.
Posts: 10
Joined: 8. Sep 2017, 21:15

Re: How to move a large directory from "/home" to "/"

Post by Phil B. »

Perry - read the original post. It says "/" has only 25G available. Also, its entire size is only 50G (just as VirtualBox creates it by default). There is no way the 70G /home/app will fit in there, no matter what kind of "mv" command you use.
Post Reply