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)

5
votes
2answers
4k 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
271 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 ...
1
vote
3answers
374 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
2k 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
479 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 ...
24
votes
3answers
3k 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
1k 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 ...
5
votes
4answers
1k 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
718 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
254 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: ...
3
votes
3answers
628 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
531 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
397 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, ...
5
votes
2answers
195 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
481 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
194 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
118 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
122 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
96 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
425 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
326 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 ...
4
votes
3answers
3k 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, ...
50
votes
7answers
11k 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
1k 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
156 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
193 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 ...
3
votes
2answers
1k 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 ...
208
votes
3answers
51k 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?
16
votes
3answers
1k 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
78 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
492 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?
9
votes
4answers
2k 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 ...
6
votes
3answers
2k 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 ...
-2
votes
2answers
915 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
856 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 ...
26
votes
2answers
5k 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
113 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
154 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
4answers
2k 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
948 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 ...
45
votes
5answers
9k 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 ...
2
votes
2answers
225 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?
5
votes
2answers
585 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?
1
vote
4answers
3k 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. ...
3
votes
3answers
366 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 ...
7
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
847 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 ...