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
3answers
345 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 ...
59
votes
17answers
6k 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?
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 ...
6
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 ...
230
votes
3answers
60k 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?
30
votes
7answers
13k 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 ...
49
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 ...
7
votes
2answers
643 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?
26
votes
3answers
4k 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
votes
2answers
999 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
867 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 .. ...
3
votes
1answer
288 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 ...
3
votes
3answers
1k views

Should /usr and /home be on different partitions?

In studying for the lcpi exam, I met the following statement. If multiple disks are available it is good practice to also have the /usr and /home directories on different partitions. ...
41
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? ...
70
votes
3answers
10k views

Why is the root directory denoted by a / sign?

I have done some research about this on Google, but the results were cloudy. Why is the / sign used to denote the root directory. Are there any solid reasons behind 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 ...
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 ...
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
1answer
3k views

Difference between lib, lib32, lib64, libx32, and libexec

My 64 bit Ubuntu 13.04 system has the following directories in /: lib lib32 lib64 libx32 libexec In the /usr directory there is: lib lib32 libx32 libexec This seemed like something that could be ...
3
votes
2answers
232 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?
2
votes
2answers
100 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 ...
-2
votes
1answer
522 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?
5
votes
2answers
557 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 ...
4
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 ...
3
votes
2answers
923 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 ...
1
vote
2answers
1k views

Why can I only run a .sh file from the parent directory, not the child directory

I am a Linux noob. I noticed that this does not work: /tomcatDirectory/bin $ startup.sh //command not found but this does work /tomcatDirectory $ bin/startup.sh I am used to Windows. It seems ...
1
vote
1answer
473 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 ...
0
votes
1answer
1k 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 ...