The layout of the directory hierarchy — questions like “where does this file belong?” or “what is this directory for?”.

learn more… | top users | synonyms (1)

69
votes
12answers
6k views

Why is Linux's filesystem designed as a single directory tree?

Can anyone explain why Linux is designed as a single directory tree? Whereas in Windows we can have multiple drives like C:\, and D:\, there is a single root in Unix. Any specific reason there?
1
vote
0answers
95 views

Where is the best place to put a local repo?

I've made a custom repo to install ruby 2.0 on Ubuntu 12.04 Currently, I have the repo in '/vagrant/files' for testing. root@gitlab:~# tree /vagrant/files/ /vagrant/files/ |-- default |-- ...
1
vote
1answer
53 views

Where to place source code for applications compiled from source?

In the past when I have compiled applications from source I have extracted the source code to ~/src and compiled from there. I realize now that there may be no need for me to create the ~/src ...
1
vote
1answer
68 views

Where to drop libraries according Filesystem Hierarchy Standard

I do operate a Linux-based build system. The build system itself is based on Jenkins, Nexus, Maven, Ant and Shell scripting. Some projects need some special tools and libraries for building. ...
4
votes
2answers
219 views

What does the jargon filesystem mean?

I know this question sound quite stupid. Sometimes when I go through sections of Linux books about filesystem, it may turn out that it is a chapter talking about the directory structure of a standard ...
0
votes
0answers
42 views

How do I restore the directory expansion arrows on Nautilus?

On Mac OS X in the list view I can click on arrows to the left of the directory and expand the directory's contents. I used to be able to do the same on Nautilus, but that functionality now seems ...
2
votes
1answer
77 views

Bad to own a directory outside of your home directory?

Some how, can't remember why, I got into the habit of downloading source to the directory /opt, which I chown to my user/group. I have this feeling that it is not a good thing to do. Is there ...
3
votes
1answer
289 views

Idiomatic location for file based sockets on Debian systems

I am writing a daemon process for a Debian system in C that uses a Unix Domain Socket. If the deamon process's working directory is the root directory, is there an idiomatic directory to place the ...
5
votes
1answer
364 views

What can go wrong if /var/tmp is on a temporary filesystem?

I have read that I should not mount /var/tmp as a temporary filesystem (e.g., as tmpfs), because files in /var/tmp must not be deleted on reboot. Is that correct? Suppose I did mount /var/tmp as a ...
3
votes
2answers
658 views

Is it OK to store /var/tmp on a SSD? [duplicate]

I have read that you should not store /tmp on a SSD, because the frequent writes will shorten the lifetime of the SSD. But what about /var/tmp? Is it reasonable for /var/tmp to be stored on a SSD? ...
1
vote
2answers
473 views

Compiling PHP and installing it under one directory

I have to compile a few versions of PHP in work but I need an apache service for each version running like we have on Windows. However the configure options seem to have different folders for ...
3
votes
3answers
2k views

Should /usr and /home be on different partitions?

In studying for the lcpi exam, I met the following statement. If multiple disks are available it is good practice to also have the /usr and /home directories on different partitions. ...
1
vote
1answer
24 views

Is there any common meaning to a `collects` directory?

I'm under the impression that there are a bunch of directory names that have common semantics, like (in no particular order): usr tmp src lib etc share opt bin sbin var data include There are ...
1
vote
1answer
154 views

Man folders and MANPATH

This thread What do the numbers in a man page mean? answers the question of the significance of the numbers between parentheses within a man page. My question is related. I have a local installation ...
1
vote
1answer
114 views

Fedora OS structure change

I recently noticed that the structure of 16: http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/16/Fedora/x86_64/os/ is different from 17: ...
3
votes
2answers
250 views

Should I use symlinks in /usr/bin or use the PATH variable instead?

I was looking to download some tool and it said to update your PATH variable, but I thought /usr/bin was the "standard".
16
votes
4answers
468 views

Which folder should I write to for my intermediate files, as a dev?

I'm starting to write a few bash scripts for my project and they need some intermediate files or variables to be written. I want to know which folders can I be sure of having access to when someone ...
1
vote
2answers
464 views

What is the “cost” of deeply nested folders in ext4?

I was running into performance problems with hundredthousands of files in single directories when I needed to do certain wildcard matches. From my applications point of view, a simple solution is to ...
1
vote
2answers
3k views

What is the best place to put php files above server root directory?

I am running a web application and I want to move a directory containing my php files above the server root directory. Where would be the best place to put them? On my web server I rent from ...
2
votes
2answers
150 views

Linux multi-user system: Each user's home partition on its own Hard Drive

I've got a pogoplug running Arch Linux that I'm using for a NAS with rsync backing up my data over SSH. Right now, I'm the only one using it, but I'd like to add my roommate as well. She has her own ...
2
votes
1answer
137 views

Where are Python dist-packages stored in FreeBSD?

I am trying to find this path on FreeBSD but it is not working: /usr/local/lib/python2.7/dist-packages This same path is working on Ubuntu. Can please some tell me where I can find Python ...
5
votes
1answer
3k views

Difference between lib, lib32, lib64, libx32, and libexec

My 64 bit Ubuntu 13.04 system has the following directories in /: lib lib32 lib64 libx32 libexec In the /usr directory there is: lib lib32 libx32 libexec This seemed like something that could be ...
5
votes
4answers
860 views

Can I share /usr/local between multiple Linux distributions?

I tried Ubuntu 12.04 and based on my understanding I made the following partitions: 2GB Swap (I have 2GB of RAM) 1GB /boot, since I'll be installing different kernel versions (I'm starting kernel ...
2
votes
1answer
1k views

use `/run/shm` (formerly `/dev/shm`) as a temp directory

Is it good practice to create a directory in /run/shm (formerly /dev/shm) and use that like a temp directory for an application? Background: I am writing black box tests for a program which does a ...
0
votes
1answer
387 views

How to safely remove hard-link to home folder?

In a folder owned by my user /sites/Website there is a dir named ~. When I cd to this directory, I am redirected to ~/, my home folder. At first I thought this was a symbolic link, but doing ls ...
1
vote
1answer
356 views

Download files and create same file structure as the source

I have a config file which consists of list of URIs I want to download. For example, http://xyz.abc.com/Dir1/Dir3/sds.exe http://xyz.abc.com/Dir2/Dir4/jhjs.exe http://xyz.abc.com/Dir1/itr.exe ...
3
votes
1answer
322 views

Why do the nfs4 tutorials recommend to bind mount sub directories

All NFS4 tutorials I have encountered so far recommend bind mounting real directories into the export root. Is this a technical necessity? If I had a directory that's only meant to be exported, is it ...
35
votes
8answers
962 views

What's the most appropriate directory where to place files shared between users?

Or: where can I put files belonging to a group? Suppose there are two users on a Unix system: joe and sarah. They are both members of the movies-enthusiast group. Where should I put their movie ...
0
votes
2answers
2k views

increasing a logical volume

I need to increase the logical volume of the var directory, the maximum size of var right now is 10GB, I need to make it 50GB. I have a Centos 6 server. The output of df -h is: Filesystem ...
4
votes
1answer
317 views

Where should user configuration files go? [duplicate]

If I look at my home directory there are a large number of dot files. If I am creating a new program that needs a user configuration file, is there any guidance where to put it? I could imagine ...
0
votes
1answer
51 views

Changing the defult directory structure

If I start a new distro (e.g. LFS): How can I change the directory structure? What should I expect after it's ready? (probably can't install most of the packages without modification, right? But, ...
3
votes
3answers
374 views

Where are userspace programs supposed to save their logs?

I am writing a script that I want to run without privileges. I want the errors that the script encounters to be logged to some log file. I do not not have privileges to write one to /var/log. And I do ...
1
vote
2answers
1k views

Why can I only run a .sh file from the parent directory, not the child directory

I am a Linux noob. I noticed that this does not work: /tomcatDirectory/bin $ startup.sh //command not found but this does work /tomcatDirectory $ bin/startup.sh I am used to Windows. It seems ...
0
votes
0answers
753 views

/media, /mnt, /run and automounting

As of Fedora15, a new directory under root was introduced. A couple of quotes: i.e. /var is "persistant runtime data" and /run is "volatile runtime data", and /etc is "persistant system config ...
4
votes
1answer
297 views

What is Darwin's 'private' directory for?

Darwin has a private directory that I don't see in the Unix documentation I've found. Is that a Mac-specific directory? What is it for? Is it preserved between system upgrades?
5
votes
1answer
210 views

Can I exclude /run from my backup scheme?

I have written a rsync-based system backup for my Linux system. The aim is to be able to redeploy the system entirely from the saves, so I don't only backup homedirs. I have excluded a few top-level ...
-1
votes
1answer
101 views

How to know what will execute at startup/bootup?

I would like what scripts will run at start, without needing to "restart and see what happens", is there any way to know what 'services' are ready to run? Shoud I check every single file in ls ...
1
vote
1answer
115 views

What is the “~/” directory?

I'm trying to locate where some files are stored and I can easily browse to them via ssh by going to "cd ~/foldername", however, I have no idea what directory "~/" actually is. When I browse around ...
5
votes
3answers
986 views

What are the advantages of the Unix file system structure

If I install an application in Linux for example Debian/Gnu Linux, the files of the applications are copied to many different directories in the file system. Some scripts goes into /usr/share .. ...
2
votes
2answers
244 views

How to determine whether a linux filesystem belongs to a running system or not

I need to write a program that receives a block device as input, like /dev/sda1, and has to perform a set of operations depending on if the filesystem inside are currently running or not. We'll ...
5
votes
5answers
322 views

Which is better for installed applications: /usr/bin or user's home directory?

It's not entirely clear to me whether it would be better to install a GUI application in /usr/bin or my home directory. I've read through this article and this one, but it doesn't really talk about ...
4
votes
1answer
430 views

How to utilize XDG directories and paths in Bash?

I wonder how to access not only the variables defined in ~/.config/user-dirs.dirs with xdg-user-dir, e.g. "$(xdg-user-dir VIDEOS)", but also the following standard variables: ...
4
votes
2answers
169 views

What is the 't' folder?

I'm mainly a Windows guy, programming C#, but I often do use technologies that were intended for Linux machines like git, MySQL, perl scripts, memcached, php, etc... And therefore I am exposed to ...
4
votes
4answers
1k views

How to visualize directory tree structures?

I know I can use tree to show the nested content of a directory. Alas, its output is hardly beautiful as I want to include it in a documentation. So eye-candy is a requirement. So I was wondering if ...
0
votes
1answer
290 views

Install GCC at a custom location without machine prefix

When installing GCC, libraries, header files and some executables are placed in directories similar to /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/ and /usr/libexec/gcc/i686-pc-linux-gnu/4.5.4/. I'm ...
16
votes
0answers
488 views

How did the system settings directory on UNIX come to be named /etc? [duplicate]

Possible Duplicate: What does etc stand for? And why isn't it named /cnf or /syscf or /cfg? No one I have ever asked has been able to tell me, not that I have access to any of the minds ...
0
votes
1answer
43 views

Convention for primary app deployment dir structure on a Unix-like app server

The client I'm working for deploys their application to a directory they created at the root level. While acknowledging it is a matter of local preference, I am unsure if this is in accordance with ...
2
votes
1answer
280 views

How to move the /var/www directory to a USB HDD?

I have a default OpenBSD 5.1 install. How Can I enabled httpd, OK. QUESTION: How can I use the /dev/sd0a on /mnt/usbhdd type ffs (local, nodev) instead of the default "/var/www" directory? What ...
2
votes
2answers
132 views

Do best-practices indicate that usage of /var should be restricted to sudoers

I wrote a package, and would like to use /var to persist some data. The data I'm storing would perhaps even be thought of as an addition for /var/db. The pattern I observe is that files in /var/db, ...
1
vote
1answer
563 views

Where to locate “sockets”

I am new to this, so sorry if its obvious. I am running a Debian server and installing the likes of UWSGI, NGinx etc on there. The configurations keep talking about pointing to "sockets". In the ...