The layout of the directory hierarchy — questions like “where does this file belong?” or “what is this directory for?”.
130
votes
3answers
21k 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?
44
votes
7answers
7k 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, ...
43
votes
16answers
3k 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?
38
votes
2answers
1k 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 ...
37
votes
4answers
2k 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? ...
33
votes
8answers
700 views
What's the most appropriate directory where to place files shared between users?
Or: where can I put files belonging to a group?
Suppose there are two users on a Unix system: joe and sarah. They are both members of the movies-enthusiast group. Where should I put their movie ...
28
votes
5answers
4k 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 ...
22
votes
5answers
2k 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 ...
22
votes
7answers
3k 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 ...
21
votes
8answers
3k 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 ...
20
votes
2answers
2k views
what is this new filesystem /run?
I just ran df -h a minute ago and noticed a filesystem has been added that I'm not familliar with. Does anyone know why /run exists? is this something that's
been added by the kernel? by Arch Linux?
...
19
votes
6answers
12k 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 ...
16
votes
3answers
1k 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?
16
votes
0answers
473 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 ...
15
votes
3answers
733 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 ...
10
votes
2answers
312 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 ...
9
votes
1answer
1k 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 ...
8
votes
5answers
453 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 ...
8
votes
2answers
601 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
4answers
858 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
924 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 ...
7
votes
2answers
787 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.
...
7
votes
1answer
260 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 ...
6
votes
2answers
388 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 ...
6
votes
2answers
527 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 ...
6
votes
2answers
355 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 ...
6
votes
3answers
974 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 ...
6
votes
2answers
140 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 ...
6
votes
4answers
465 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
3answers
273 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 ...
5
votes
2answers
313 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 ...
5
votes
4answers
117 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 ...
5
votes
3answers
1k 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 ...
5
votes
2answers
143 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 ...
4
votes
4answers
710 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 ...
4
votes
5answers
207 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
558 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 ...
4
votes
1answer
182 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/, ... ...
4
votes
3answers
216 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, ...
4
votes
1answer
194 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
1answer
71 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 ...
4
votes
2answers
112 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 ...
4
votes
2answers
227 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 .. ...
4
votes
1answer
73 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
133 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
2answers
426 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 ...
4
votes
1answer
303 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 ...
3
votes
3answers
82 views
Where are userspace programs supposed to save their logs?
I am writing a script that I want to run without privileges. I want the errors that the script encounters to be logged to some log file. I do not not have privileges to write one to /var/log. And I do ...
3
votes
3answers
181 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 ...
3
votes
2answers
99 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 ...

