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)

4
votes
1answer
362 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
256 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
118 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 .. ...
2
votes
2answers
270 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
356 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
562 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: ...
5
votes
2answers
178 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
2k 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
352 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
491 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 ...
1
vote
1answer
51 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
308 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
139 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
853 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 ...
3
votes
3answers
316 views

Why do I get 3048 MB from a 64 MB flash memory?

I have a Linux based STB (set-top-box) and it features a 64 MB flash memory and 256 MB of RAM. I wanted to take a backup of some of my settings before I flash it with another image, but I wasn't sure ...
36
votes
8answers
20k views

Why is the root directory on a web server put by default in “/var/www”?

Tuxfiles says the following about the Linux directory structure: /var: This directory contains variable data that changes constantly when the system is running. FHS on /var says the ...
2
votes
0answers
81 views

What is the equivalent of /usr/share/misc on Solaris?

The Linux Filesystem Hierarchy Standard has the following to say: This directory contains miscellaneous architecture-independent files which don't require a separate subdirectory under /usr/share. ...
0
votes
1answer
1k views

Home folder structure in Ubuntu 12.04.1?

Long story short, i just accidentally deleted my entire home folder. Thankfully it seems like the hidden files are still there. I'm not sure, but aren't all of the folders within the home folder ...
5
votes
1answer
1k views

Where to install applications

I'm a long-time Windows user in the middle of a multi-year personal migration to Linux-based development. On Windows when I installed an application it got put in the Program Files folder and I'd ...
4
votes
1answer
91 views

Transform directory structure

I have the following folder structure root folder |-al2 |- GER.zip |- ENG.zip |-ww |- GER.zip |- ENG.zip and so on. The folder names are random strings. I want to sort the files in ...
4
votes
2answers
1k views

Why can't I navigate into my Documents directory?

I'm in bash and running F17 as su. My pwd is /home/user and when I ls I see Desktop Documents Downloads Music Pictures Public Templates Videos However, I'm unable to cd into any of these. My ...
3
votes
1answer
305 views

How does the Linux file structure work?

I see the different folders bin, dev, mnt, proc, srv, sys, etc. What are the properties of all these different folders? What are there purposes? Are there files in some of them that I should not ...
10
votes
2answers
344 views

Why do so many programs live in PATH?

One thing that puzzles me about desktop Linux, at least, is that just about everything is in my PATH. By everything, I mean every desktop application, including things like gnome-character-map and ...
1
vote
1answer
121 views

Linking “..” do somewhere other than parent directory and other strange fs beharviors

Can the entry ".." become linked to someplace other than the parent directory? Is it possible to cause "tar" to create this weird behavior? Scenario: I have a pre-built compiler to a embeded system, ...
0
votes
1answer
2k views

Looping over directory entries in bash and saving to an array

(See update at the foot of the question). This is a followup question to "Make directory copies using find". This question involved manipulating a bunch of directories, This got too complicated to ...
4
votes
1answer
783 views

opendir and readdir encoding strings behind my back?

(You can skip the details to the last couple of lines if you're able to answer the question :) ) I'm on an Ubuntu 12.04. I'm trying to resolve an old issue that I've posted about in the past (if ...
8
votes
4answers
2k views

Preferred mount points for internal HDDs

I am relatively new to Linux and I apologise if this is a silly question. I read the Linux FS Hierarchy document but it didn't answer my question. I would like to know if there is a typical drive ...
7
votes
5answers
11k views

Find the total size of certain files within a directory branch

Assume there's an image storage directory, say, ./photos/john_doe, within which there are multiple subdirectories, where many certain files reside (say, *.jpg). How can I calculate a summary size of ...
2
votes
1answer
201 views

How should I install software from source so that I can make my configuration manageable and reproducible?

I work with a lot of scientific software on Linux distributions (normally Debian variants and Red Hat variants). In order to maximize performance and get access to the latest features, it's often ...
1
vote
2answers
325 views

Filesystem organization for software in HOME

When installing software in $HOME, how do the linux filesystem hierarchy directories map to subdirectories of $HOME? I am asking this question so that I can write a build system that picks reasonable ...
4
votes
1answer
306 views

configuration ethics (esthetics): /etc vs $HOME

Ok this may not be a very concrete question, and is perhaps subject to taste, yet I'm struggling to get this right so here it goes. I have a computer. This computer has linux on it (thank god). Arch ...
4
votes
2answers
128 views

Location of application files?

Does Linux/Unix have a unified location for Application files, like "~/Library/Application Support" on Mac OS X? I'm making a Python script that will need to store permanent but changing data, and I ...
12
votes
2answers
3k views

Permissions/ownership of /usr/local/bin

From what I understand, the right place to put your own scripts is /usr/local/bin (for instance a script I use to back up some files). I notice that this folder is currently (by default) owned by ...
8
votes
1answer
3k views

Where should a local executable be placed?

I have an executable for the perforce version control client (p4). I can't place it in /opt/local because I don't have root privileges. Is there a standard location where it needs to be placed under ...
1
vote
2answers
92 views

Where are “headers” for other languages kept?

If I were to write a library for a C-incompatible language (like D), where would be the best place to install my "header files" to? usr/include seems like a bad idea, since the FHS says it's for ...
4
votes
2answers
2k views

Recommended location of node.js applications in linux filesystem?

Where is the conventionally accepted location of node.js/express web apps, in a linux file system? Currently I've got a subdirectory in /opt/ but I'd like to hear other people's view on this...
2
votes
1answer
74 views

Deploy libs in hard-coded dir

I have a set of libraries and some apps that depend on it. Some of these libraries names might conflict with already installed libraries. The easiest way for me to deploy them would be Install the ...
1
vote
3answers
368 views

Are .bz2 files inside /var/lib/pengine safe to delete?

My problem is that my /var partition is over 80% (total size: 4.9G). I was reviewing the files into this partition and I saw a file which has 3.4G. (/var/lib/pengine) I dig into that /pengine file ...
0
votes
1answer
641 views

/run in Debian Squeeze

I'm running Debian Squeeze (6.0.1) on a NAS (LinkStation, mipsel). I installed minidlna from unstable and noticed the daemon won't start because it can't create /run/minidlna. After a little googling ...
6
votes
2answers
5k views

How to copy only matching files, preserving subdirectories

Is there a way to do this: "How can I copy a subset of files from a directory while preserving the folder structure?", but without using rsync? Is it possible to be done using only cp, find and grep? ...
1
vote
0answers
347 views

Directory/file naming conventions when storing media collection on Linux

I am building a NAS/HTPC that will operate under Debian (Wheezy, probably). I am trying to design the directory schema for what will be stored on the server so that everything is nice and uniform for ...
2
votes
2answers
434 views

What is an appropriate naming structure for storing application packages?

I need to determine an appropriate directory naming structure for a package management system. The original directory structure was not POSIX-compliant in any way and certainly not UNIX-style (you'll ...
7
votes
2answers
3k views

How can you move (or copy) all files to a directory with the same filename prefix?

Using Bash So let's say I have a bunch of files randomly placed in a parent directory ~/src, I want to grab all the files matching a certain suffix and move (or copy) them to a ~/dist directory. ...
5
votes
2answers
705 views

What's the difference between /etc/rc.d/rc*.d and /etc/rc*.d

I know that rc*.d directories are used at startup, or reboot, or so on time, for starting or stopping programs. Can anybody explain me what's the difference between the rc*.d folders placed under the ...
29
votes
3answers
6k views

What is the difference between /tmp and /var/tmp?

On most FHS systems, there is a /tmp folder as well as a /var/tmp folder. What is the functional difference between the two?
1
vote
1answer
2k views

XDG user directories

After installing Linux Mint Debian edition my .config/user-dirs.dirs looks like this: # This file is written by xdg-user-dirs-update # If you want to change or add directories, just edit the line ...
6
votes
4answers
2k views

Where in “/” should extra disks be mounted?

According to Wikipedia http://en.wikipedia.org/wiki/Unix_directory_structure http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard extra disks should not be mounted in /mnt/ according to the ...
7
votes
2answers
802 views

What's the origin of rc, rc.d, share, proc in Linux?

I don't think I am a newbie at all, but I still can't figure out many abbreviations' origin like rc, rc.d, share, proc... I've heard someone says rc is "run command", .d is directory, but I'm not ...