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
1answer
14 views

How can I know the default path for log directory?

I am programming in shell scripting, and would like to log results. Is there any way to know what is the default path storage for logfiles in my operating system? I have researched: set | grep ...
3
votes
2answers
25 views

convention regarding offline temporary data

When writing small utility programs, I sometimes want to keep small amounts of data around between executions, usually for caching purposes, but don't want the program to run as a daemon. Are there ...
1
vote
1answer
50 views

Where did this copy of my home directory come from?

I was working on a project to control my digital camera using Ubuntu and gphoto2. At one point I noticed a new "~" directory in my project folder, /home/greg/project/~. When I enter this new "~" ...
17
votes
1answer
598 views

At what point did the /home directory appear?

Originally in Unix, /usr was used for user (home) directories. So if I had a user named alex, my home directory would be /usr/alex. (Interestingly, Plan 9, the successor to Unix, still has user ...
1
vote
2answers
37 views

Location of Xorg headers on FreeBSD 10

I'm running FreeBSD 10 and I'd like to build dwm. I've installed Xorg using pkg install. Where are the headers located? Maybe I'm just old fashioned but I first looked in /usr/X11R6 ... not there. ...
3
votes
1answer
106 views

Why does installing to /usr/bin automatically install to /usr/bin/X11?

I am using the command: install ./prog /usr/bin to copy the program to the /usr/bin directory. Doing this automatically installs the prog to /usr/bin/X11. Deleting from /usr/bin also automatically ...
1
vote
3answers
46 views

Consistency in default installation directories

I am very new to Linux (Ubuntu 13.10) and having difficulty understanding the file system, particularly with regards to installing applications. In Windows, when I installed an application, it put the ...
2
votes
3answers
234 views

Adding to path vs. linking from /bin

Our sys admin installed a software (Maven) on the server, and told everyone to add the "/usr/local/maven/bin/" folder to their path. I think it could be more convenient to just link the few programs ...
1
vote
1answer
29 views

Deploying my application

When deploying my application under linux, where do I put my libraries, executable and the desktop entry file? And what about other files my program needs? For example background pictures, audio files ...
1
vote
3answers
50 views

Where to put wrapper scripts?

I created some scripts for administrative tasks etc, I made them to be independent from environment - every dependency is injected through arguments. However it is annoying to provide to script ...
2
votes
2answers
55 views

Should my /usr/local/bin be 700 permissions?

I just installed npm and node.js, and I couldn't access npm. And I'm like "why?" and my OS is like "because /usr/local/bin is at 700 permissions" and I'm like "should it really be that way?" ...
3
votes
1answer
58 views

Redirect home to shared NTFS partition

I've installed windows 7 and linux dualboot. My partitions are: /dev/sda2: UUID="EC328C61328C329E" TYPE="ntfs" /dev/sda3: UUID="800E88610E8851D8" TYPE="ntfs" /dev/sda4: ...
1
vote
1answer
51 views

Server socket location, startup and monitoring

I'm writing a server on a shared development desktop that moonlights as a server. This is my first attempt at writing a linux server for someone else on a shared box. I'd like to conform to unix ...
2
votes
2answers
61 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 ...
1
vote
1answer
77 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
108 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
126 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
63 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 ...
69
votes
3answers
10k 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
140 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
104 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
90 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
62 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 | |-- ...
2
votes
1answer
77 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
45 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 ...
66
votes
12answers
5k 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
74 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
45 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
57 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
170 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
37 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
63 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
144 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
220 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
384 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
309 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
858 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
19 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
92 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
96 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
156 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
441 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
263 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 ...
0
votes
2answers
2k 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
114 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
112 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 ...
4
votes
1answer
2k 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
732 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 ...
1
vote
1answer
592 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
230 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 ...