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)

2
votes
2answers
319 views

Directory structure for mounted disks in network storage

I have recently built a small homeserver, that I want to use as a NAS besides other applications like hosting VMs etc. The disk space should be accessible via NFS, SAMBA (and SSHFS), but that's not ...
2
votes
1answer
104 views

What is the tmp folder in /var?

I have a tmp folder in /var and it has the file channel.xml in it. I don't know what this is and if it should be there and what permissions it should have because at the moment it is wide open. Also ...
6
votes
2answers
497 views

Linux File Versioning?

We are migrating from A VMS environment to a Linux environment for some old alpha servers we are decommissioning. The one challenge I have not been able to overcome is file versioning. VMS keeps ...
5
votes
3answers
422 views

Splitting the Home dir two different partitions

I run a Ubuntu desktop environment with two harddisks. A small SSD and a large regular disk. Currently i run a setup where my home drive is located on /home/name, but some folders e.g. Downloads ...
3
votes
3answers
107 views

How do I search all subdirectories to find one with a certain name?

Let's say I have a top level directory called /dir and many sub directories. How do I search the subdirectories of /dir to find the one called x/x/dir/x/x/x/target? This question is similar to, but ...
73
votes
3answers
11k views

Why is the root directory denoted by a / sign?

I have done some research about this on Google, but the results were cloudy. Why is the / sign used to denote the root directory. Are there any solid reasons behind it?
0
votes
4answers
308 views

Does software installed in one distribution of linux run in another distribution of linux?

Suppose, I create seperate partition for "/usr" directory. This is the directory which contains all user programs. If I switch from one OS to other(for eg. From Ubuntu to Arch Linux or vice versa), ...
4
votes
1answer
132 views

Why does System V traditionally symlink /bin to /usr/bin?

This systemd wiki page about the /usr merge, under Myth #6, states that /bin has traditionally been a symlink to /usr/bin on System V UNIX. What is the motivation for this? For backwards ...
2
votes
2answers
197 views

Is there a --parents option for mv like for cp?

cp has a useful feature --parents that allows a file's directory structure to be copied to another directory: $ cp -v --parents source/directory/from target/ ‘source/directory/from’ -> ...
1
vote
3answers
72 views

Can tree be used to list the number of files per level?

As title, I need to look into a particular directory and list the number of files per level. The directory is pretty large, about 10-15 levels deep. For instance, if I have the following: D1 | |-- ...
3
votes
1answer
285 views

Cowfiles directory?

My bashrc issues a cow from cowsay and with a random fortune. Like this: echo -e "\e[00;33m $(fortune -a -o -s | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) | sed -e 's/^/ /g')\e[00m" ...
2
votes
2answers
153 views

netcdf installation and usr/local… folders

I need to install netcdf on a SuSE Linux machine but I am having a few problems understanding the usr/local/ folders and my the myusername/local/ folders. What I think I need to do is go into the ...
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
100 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
55 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
82 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
259 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 ...
2
votes
1answer
81 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
456 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
525 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
833 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
614 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
27 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
217 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
130 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
319 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
474 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
565 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
4k 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
172 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
262 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 ...
7
votes
1answer
4k 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
941 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 ...
3
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 ...
1
vote
1answer
687 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
600 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
382 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
1k 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
401 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
52 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, ...
4
votes
3answers
488 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
835 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
351 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
247 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
102 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
117 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
1k 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 .. ...