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
284 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
845 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
1k 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
524 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
235 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
588 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
240 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/, ... ...
5
votes
2answers
127 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
137 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
108 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
464 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
371 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
3k 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 ...
7
votes
3answers
5k 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
16k 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, ...
2
votes
2answers
2k views

Where to store media files on a shared linux server

I want to start using our home server as a media server for movies and shows, the question is where is the most appropriate place to store them? The most appropriate places seems to be: /var My ...
2
votes
1answer
169 views

Why is iwconfig in /sbin?

My Ubuntu boot has iwconfig living in /sbin. I was under the impression that /sbin is usually for programs that are required for bootstrapping, or at least need to be available before /usr is ...
2
votes
1answer
229 views

Why are there so many files and folders within the folder of Tomboy?

I have 142 notes in Tomboy but I don't understand why is there such an amount of files and folders created inside the main folder of Tomboy. In there, there are 5 subfolders, named "0", "1"... "4" and ...
4
votes
2answers
2k views

How does /dev/fd relate to /proc/self/fd/?

$ ls -l /dev/stdin /dev/fd/0 lrwx------ 1 tim tim 64 2011-08-07 09:53 /dev/fd/0 -> /dev/pts/2 lrwxrwxrwx 1 root root 15 2011-08-06 08:14 /dev/stdin -> /proc/self/fd/0 $ ls -l /dev/pts/2 ...
252
votes
3answers
77k views

What is the purpose of the lost+found folder in Linux and Unix?

There is a folder at the root of Linux and Unix operating systems called /lost+found/ What is it for? Under what circumstances would I interact with it? How would I interact with it?
17
votes
3answers
2k views

Standard and/or common directories on Unix/Linux OSes

Coming from the Windows world, I have found the majority of the folder directory names to be quite intuitive: \Program Files contains files used by programs (surprise!) \Program Files (x86) contains ...
1
vote
1answer
80 views

What do I install into a given install prefix

Which directories should I expect to have in an install prefix when I'm writing makefiles? I've noticed that in the common prefix /usr, there is no /etc, yet there is an /include dir, which isn't in ...
-2
votes
1answer
598 views

“Clean” Filesystem Hierarchy

The Linux filesystem hierarchy is full of unused folders that only exist for historical reasons. Do any distros install with only the directories that are actually used?
10
votes
4answers
3k views

What is the difference between /etc and /usr/local/etc

I am developing a daemon that needs to store lots of application data, and I noticed that on my system (Fedora 15), there is a /usr/local/etc directory. I've decided to install my daemon to ...
7
votes
3answers
3k views

File and directory naming conventions

I want to refactor the files and directories on my system. However I am not sure what is best practice. After reading this question and it's answers I assume the most important part is to be ...
-1
votes
2answers
1k views

Is the linux directory structure obsolete and obtuse? [closed]

I genuinely feel that the Linux directory system presents an obstacle for users migrating from other systems as well as being a bottleneck for the evolution of Linux itself. Rest assured I am not here ...
5
votes
3answers
2k views

Mounting a device — role of /dev, /media and /mnt, and the mount command [closed]

I have several closely related questions about what happens when I insert a CD. The files on the CD /media/Ubuntu\ 11.04\ i386/, but from what I've seen /dev/cdrom is also involved. What is the ...
30
votes
2answers
8k views

What is this new /run filesystem?

I just ran df -h a minute ago and noticed a filesystem has been added that I'm not familiar with. Does anyone know why /run exists? Is this something that's been added by the kernel? By Arch Linux? ...
0
votes
2answers
119 views

where on the filesystem do user-generated system scripts go?

I have a couple command line php scripts and also php pages that call the same class file. Instead of having mutiple copies of it floating around, I want to put class.myApi.php in one central location ...
6
votes
2answers
167 views

Placement of application and user files on linux system

In which directories should I place the following? I have an application with few .net assemblies, a default database (containing default application settings), a directory with 100's of images, a ...
5
votes
5answers
4k views

Difference between “/export/home” and “/home”

In our UNIX machine my home path looks like /home/<userid> and we have another batch user whose home looks like /export/home/<userid> I want to know whats the difference between ...
6
votes
2answers
2k views

Which is the best practice when replacing a system binary?

I'm working on Mac OS X which is shipped with several binaries mostly located in /usr/bin/ and /usr/sbin/. Since it doesn't have a native package manager like some Linux distros, I got used to ...
65
votes
5answers
17k views

What is the difference between /opt and /usr/local?

According to the Filesystem Hierarchy Standard, /opt is for "the installation of add-on application software packages". /usr/local is "for use by the system administrator when installing software ...
3
votes
2answers
246 views

Where should I copy-paste-install software to?

I'm installing IntelliJ, and the readme tells me to choose an installation folder. Where is a good, standard place to put installed programs?
7
votes
2answers
748 views

How can I copy a subset of files from a directory while preserving the folder structure?

I want to move some subset of files from dirA to dirB (let's say files with "blah" in the filename), but I want all the nested directories to be the same in the new location. How can I do that?
2
votes
4answers
4k views

Why did my package get installed to /opt?

A while back I installed couchdb from source on my debian machine. It seemed to install okay and everything worked. A few weeks later I wanted to upgrade and installed from a .deb using dpkg. ...
4
votes
3answers
488 views

Best directory for shared scripts

What is the conventional directory to keep shared scripts that might be used by more than one user? I've read through this overview of the standard file system hierarchy, but it doesn't seem to ...
8
votes
3answers
2k views

How does the Linux file system/organization differ from Windows?

One of the things that really slows me down in catching on with Linux is the huge difference between the file system in Linux versus Windows. Up until the last 3-4 years I only used Windows systems ...
3
votes
2answers
1k views

What directories/file permissions should i ensure are set?

I have a similar question about default software configuration. For this question i would like to ask What directories/file permissions should i ensure are set? Aprrently Is it normal to get ...
27
votes
5answers
5k views

Why do /usr and /tmp directories for Linux miss vowels in their spellings?

I have often started to think about this but never found a good answer. Why are these two Unix directories not /user and /temp instead? All the other directories under root seem to be exactly what ...
43
votes
4answers
3k views

How do I know where to put things in linux?

Installing something in windows takes a click of a button. But every time I try to install something in linux, which is not found in APT, I get so confused. You download a zipped folder, then what? ...
51
votes
3answers
2k views

Why does '/' have an '..' entry?

This just baffles me. Why does the root directory contain a reference to a parent directory? bob@bob:/$ ls -a . build home lib32 mnt .rpmdb sys vmlinuz .. cdrom ...
36
votes
7answers
20k views

What does etc stand for?

What does the "etc" folder in the root directory stand for? I think knowing this will help me remember where certain files are located. Update: Might be useful for others, the folder is used for ...
28
votes
8answers
30k views

What is /usr/local/bin? Came across it in an script installation for Applescript but would like to know more

Before today, I've used Terminal to a limited extent of moving in and out of directories, changing the dates of files using the touch command, but had realised the full extent of Terminal after ...
2
votes
3answers
149 views

Carry-on Ubuntu Customization

Like most of us, I have several machines: at home, at work, for travelling... etc. I mainly write papers or books while I code. But I'm tired of svn'ing, rsync'ing and so on, so I've decided to carry ...
66
votes
17answers
7k views

Where should I put software I compile myself?

I need to compile some software on my Fedora machine. Where's the best place to put it so not to interfere with the packaged software?