Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where to put my files?

21 views
Skip to first unread message

Jordan

unread,
Oct 29, 2012, 6:16:21 PM10/29/12
to
I'm new (ish) to Linux, using Ubuntu.
How compulsory is the default folder structure?
I'm running out of space on my hard drive. Anything wrong with placing
my stuff on another one?
Am I making sense?

J.

Moe Trin

unread,
Oct 30, 2012, 11:02:53 PM10/30/12
to
On Tue, 30 Oct 2012, in the Usenet newsgroup aus.computers.linux, in article
<k6mv7o$kuu$1...@dont-email.me>, Jordan wrote:

Hmmm... no replies yet?

>I'm new (ish) to Linux, using Ubuntu.
>How compulsory is the default folder structure?

It's your system, you can do as you wish. But in reality, there is
a relative standard way of doing things - battle tested over 30+ years
of the UNIX operating systems. You might want to start with the
"Filesystem Hierarchy Standard" from http://www.pathname.com/fhs/ and
an explanatory guide named "Linux Filesystem Hierarchy" available from
http://tldp.org/guides.html.

>I'm running out of space on my hard drive.

Do you know why (found a bunch of neat stuff to download, or didn't
plan ahead to be doing so) or is it another mystery?

>Anything wrong with placing my stuff on another one?

Nothing at all. More experienced users may intentionally divide
things up such that /home/ is located on a different partition of the
same drive, or on a separate drive entirely. The rational is that
the installer program used when you update/replace your current
version can do it's thing on the main Linux partition, and it won't
mess with other partitions/disks so you have all of "your" files and
stuff on the new one.

[fermi ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 33661668 3384696 28567052 11% /
/dev/sda2 150205500 1793556 140781876 2% /home
tmpfs 1993988 380 1993608 1% /dev/shm
[fermi ~]$ ls /
bin dev home lost+found mnt opt root selinux sys usr
boot etc lib media net proc sbin srv tmp var
[fermi ~]$ grep sda /etc/fstab
/dev/sda1 / ext3 defaults 1 1
/dev/sda2 /home ext3 defaults 1 1
/dev/sda3 swap swap defaults 0 0
[fermi ~]$

What I did here is to install on the first partition. There is an
EMPTY directory called /home on that partition. The second line in
/etc/fstab shown causes the second partition with all of my users and
user files and stuff to be mounted automatically at boot in that
empty point - and now when I look in /home/ibuprofin/ I find all of
my stuff. This is essentially the only changes needed. The entry in
the password file is "normal"

[fermi ~]$ grep ibuprofin /etc/passwd
ibuprofin:x:504:100:Moe Trin:/home/ibuprofin:/bin/bash
[fermi ~]$

so everything is transparent. The other (normal) users on the system
also have their directories on /dev/sda2 which has a directory
structure like

home/user1 ---> and all of that user's stuff
home/user2 ---> and so on

What I did to make the change was to

1. use mkfs.ext3 to create a filesystem on the new place (same
idea as "format d:")
2. mount the new partition TEMPORARILY in /mnt (command syntax is
"mount /dev/sda2 /mnt")
3. Move all the stuff from /home/* to /mnt/* keeping the same
directory structure - many ways to do that
4. UNmount the new partition ("umount /dev/sda2")
5. mount the new partition over the "old" /home ((command syntax is
"mount /dev/sda2 /home")
6. edit /etc/fstab and add the line telling the system to mount the
new partition as shown above.

>Am I making sense?

Yup - except we don't call them "folders" - that's a windoze term
stolen from the Macintosh operating system who in turn stole it from
Xerox in the early 1980s. They're called "directories". ;-)

Old guy

Jordan

unread,
Oct 30, 2012, 11:45:47 PM10/30/12
to
On 31/10/12 14:02, Moe Trin wrote:
>
>
>> I'm new (ish) to Linux, using Ubuntu.
>> How compulsory is the default folder structure?
>
> It's your system, you can do as you wish.


>
>> I'm running out of space on my hard drive.
>
> Do you know why (found a bunch of neat stuff to download, or didn't
> plan ahead to be doing so) or is it another mystery?


>
>
>> Am I making sense?
>
> Yup - except we don't call them "folders" - that's a windoze term
> stolen from the Macintosh operating system who in turn stole it from
> Xerox in the early 1980s. They're called "directories". ;-)
>
> Old guy
>

That looks like a good comprehensive answer - many thanks Old guy.
I'll have to work through it slowly though, sounds a bit technical!
The HDD is nearly full because I used one I already had - a bit small
these days I guess.
Folders? I'm going to call them directories from now on, like they were
called also in MS-DOS.

Zebee Johnstone

unread,
Oct 31, 2012, 12:07:13 AM10/31/12
to
In aus.computers.linux on Tue, 30 Oct 2012 09:16:21 +1100
Jordan <jor...@koora.net> wrote:
> I'm new (ish) to Linux, using Ubuntu.
> How compulsory is the default folder structure?

Depends....

On the whole, you can put things were you like, some programs expect
them in a certain place and might get confused if they are not there.

very few programs that will manage your personal files, such as word
processors or image managers will get confused. Most of them will
default to expecting to find or save things in a certain place, such
as Firefox wanting to save things in Downloads but you can change that
default behaviour.

File them how it makes sense to you and make the programs cope.

Program files usually d need to be in certain places for a quiet life.
It is certainy possible to put them elsewhere but you usually have to
do a bit of faffing about to make sure it all works.

> I'm running out of space on my hard drive. Anything wrong with placing
> my stuff on another one?
Nothing at all wrong with doing that.

You might find that a desktop searcher has trouble but as long as you
know roughly where they are then no issue.

I do suggest you think about a suitable filing system that suits how
you think about your stuff as you are the one who will have to locate
it all and tell things where to find them.

Zebee

Jordan

unread,
Oct 31, 2012, 6:37:23 AM10/31/12
to

>
> I do suggest you think about a suitable filing system that suits how
> you think about your stuff as you are the one who will have to locate
> it all and tell things where to find them.
>
> Zebee
>

Thanks heaps, Zebee. That's reassuring.
It's mostly just text, pics, vids and such - nothing "dynamic" like an
executable file - that I'd store on another drive.
0 new messages