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)

3
votes
3answers
298 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 ...
31
votes
7answers
15k 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
982 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
928 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
90 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
921 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
294 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
336 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
118 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
669 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
1k 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 ...
5
votes
5answers
8k 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
187 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
301 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
292 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
126 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 ...
11
votes
2answers
2k 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 ...
7
votes
1answer
2k 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
91 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 ...
3
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
73 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 ...
0
votes
3answers
330 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
622 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
327 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
417 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
616 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 ...
27
votes
3answers
5k 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
771 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 ...
3
votes
3answers
268 views

bash function to find a directory recursively

How can I write a bash-function that finds a specific parent directory. Here's my setup: /home/user/dev/project1/branch1/deeply/nested/module/structure The app-server used for devs is located at: ...
4
votes
3answers
749 views

Why the unix bin directory named in that way?

I thought the bin directory is the place for binary files. If so, what about script files? Should they be placed somewhere else? What's the history of bin directory and where should I put script ...
4
votes
3answers
870 views

Directories with binary files in Linux

I noticed that when I install new application there are a few possible directories where the resulting binary file will be placed. You can install with packaging manager, compile with make, ...
1
vote
1answer
472 views

What's the difference between `/usr/share/emacs/site-lisp/` directory and `/usr/share/emacs23/site-lisp/` directory?

I use Emacs 23 on my system. I received a file from a colleague (who has a different Linux distro) to add to the /usr/share/emacs/site-lisp/ directory. As I worked to do this, I noticed another, ...
6
votes
2answers
224 views

Where should I place a downloaded tarball?

I have downloaded the ChromePlus tarball and extracted it to my home directory. The extracted folder contains an executable that I can double-click to launch ChromePlus. So I assume I do not need to ...
10
votes
1answer
2k views

What are the .Trash-500 and .Trash-1000 directories?

I have a DNS-321 NAS drive which apparently runs Linux, so I logged in via ssh and I see .Trash-500 and .Trash-1000 directories. I realize that they're for trash, but why do I need two? Inside of them ...
7
votes
1answer
551 views

What is the purpose of `/etc/group-`

On a standard Linux distribution (e.g. Ubuntu) there is usually /etc/group and /etc/group-, where the second one is only readable by root. man group only describes /etc/group. Thus my question: What ...
4
votes
1answer
211 views

What's the name of the top-level directory

I am using Ubuntu. I know by using cd ~/ , I can go to home/ directory. But if I want to go to the directory (I do not know the official name of this directory) which contains etc/, var/, opt/, ... ...
3
votes
2answers
121 views

Where to install local software that runs before /usr is available?

I'm writing a local program to be called by a udev IMPORT{program} rule. Normally, I'd install local software in /usr/local, but these udev rules are run when block devices appear. So they're running ...
4
votes
2answers
132 views

Where is a good place to put applications that come pre-compiled?

Certain applications like Blender and Eclipse come precompiled in a tarball. Usually I put the directories in my home folder and access them from the command line. Is there a better place to put them ...
2
votes
2answers
104 views

how to have find on a directory with a changing pattern?

I have a folder structure like this: /domains/some-domain-1/applications/j2ee-apps /domains/some-domain-2/applications/j2ee-apps /domains/some-domain-3/applications/j2ee-apps What is the best way ...
6
votes
2answers
452 views

Why `.` is displayed by `ls`?

After reading the question When you type “ls -a”, what is the significance of “.” and “..”?, I have a similar one. Why to display .? I mean, is there any directory where cd . would not work? How is ...
5
votes
3answers
358 views

When you type “ls -a”, what is the significance of “.” and “..”?

Whenever you type ls -a into the command prompt, you usually get all of your folders, files, and then you see that the first two entries are . and .. Just curious, but what is the significance of ...
10
votes
5answers
2k views

What's so special about directories whose names begin with a dot?

I was wondering what the difference between these two were: ~/somedirectory/file.txt and ~/.somedirectory/file.txt It's really difficult to ask this on Google since I didn't know how to explain ...
5
votes
3answers
4k views

Should I put application into /usr/local or /usr/local/share?

What are the "standards" -- should I put application (not just binary, but entire distribution) to /usr/local or /usr/local/share. For example scala or weka -- it contains examples, binaries, ...
53
votes
7answers
14k views

What is the Linux equivalent to C:\Program Files?

I understand that in Windows as well as Linux and Unix, a program|application|software can be installed in any directory. Also if packages are installed using the distribution's packaging system, ...