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)

4
votes
1answer
42 views

Where to store shared data in FHS 3.0?

I'm working on a FHS2-conforming application that used to store data in $sharedstatedir (i.e. $(prefix)/com, e.g. /usr/local/com). This directory is no more in FHS 3.0, and it seems that we need to ...
1
vote
0answers
19 views

How should I distribute files/packages/software across multiple drives?

I am primarily a Windows user, but I am starting to use Linux more as I realize all the features it has. In Windows, I install my software that I use regularly on my 120GB SSD, along with the OS, ...
0
votes
2answers
76 views

Which Linux distribution places all applications in /opt?

I read on DistroWatch quite a while back that there's a Linux distribution that installs all application files in /opt directory. However, I do not remember the name of this distribution. Anyone ...
3
votes
3answers
444 views

Should I use symlinks in /usr/bin or use the PATH variable instead?

I was looking to download some tool and it said to update your PATH variable, but I thought /usr/bin was the "standard".
0
votes
1answer
21 views

How to package (where to install) a stand-alone software bundle

Consider some application that is intended to be built in its destination directory and whose subdirectory structure does not respect Linux conventions. Assume in particular that there is no install ...
4
votes
1answer
573 views

Cowfiles directory?

My bashrc issues a cow from cowsay and with a random fortune. Like this: echo -e "\e[00;33m $(fortune -a -o -s | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) | sed -e 's/^/ /g')\e[00m" ...
57
votes
8answers
33k 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 ...
5
votes
3answers
10k views

Adding to path vs. linking from /bin

Our sys admin installed a software application (Maven) on the server and told everyone to add the /usr/local/maven/bin/ folder to their path. I think it could be more convenient to just link the few ...
1
vote
2answers
65 views

The linker does not find libraries in /lib

I am building a small embedded system for a x86_64 target, with a Linux kernel and an initramfs which contains a dynamically linked busybox. I tried to install the needed libraries (libm.so.6, ...
4
votes
5answers
197 views

directory structure vs file system

What is the difference between directory structure and file system? Unix/Linux directories and file system looks as follows: The following two directories obviously we know directories. ...
4
votes
3answers
124 views

What is the difference between home$ and ~$?

I'm learning Linux, and I'm a little confused right now. In the below screenshot, I was not able to understand the third shortcut of Table 2-1. It says that cd ~user_name will change the working ...
2
votes
1answer
42 views

Standard config file naming pattern and locations?

I am writing my application foo, with frontend foo-gtk. I want to install a default/systemwide config file, which I infer would go under /etc/foo.conf, and possible /etc/foo-gtk.conf for default gui ...
1
vote
1answer
22 views

Strangeness with Symlinks and Relative Paths

Could someone please explain this to me? I'm having trouble understanding how this is set up and why it behaves the way it does. I wanted to see where zsh is actually installed on a machine that I ...
1
vote
1answer
27 views

Search directories and return size / disk space usage for each

On my server I have a bunch of accounts that have WordPress installed and also have backup directories in the format: softaculous_backups. I can find all the directories using the command: $ find / ...
6
votes
5answers
282 views

How to execute a bash command in all possible subdirectories?

Let's say my main directory is /home/test Under it i have lots of subdirectories and under subdirectories still a lots of them and so on. Example: /home/test /home/test/subdir1 ...
9
votes
3answers
2k views

find with -execdir

I run a find with -execdir both I don't get the results I was expecting. SSCCE below: mkdir -p a/b/c find . -type d -execdir touch foo \; $ tree a a ├── b │   ├── c │   └── foo └── foo Directory c ...
0
votes
1answer
27 views

By convention, where do packages go to install on other machines?

I'm working on a script that will scp a tarball to another machine and extract and install it's contents via ssh. I have to install this script as one bash file and one tarball. I could install the ...
2
votes
2answers
469 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 ...
0
votes
1answer
45 views

Difference between /opt/bin and /opt/X/bin directories

The /opt/ directory in Linux is used for installing add on packages. What is the difference between the /opt/<package>/bin directory and the /opt/<package>/X/bin directory? What is the ...
5
votes
3answers
4k views

Laptop unusable after deleting /bin

For a long time I've been wanting to get into Linux so I asked my friend if I could borrow his laptop (he's running Ubuntu). I was playing with it for a while and getting used to it, I saw his ...
1
vote
1answer
51 views

Install self compiled software to /usr or /usr/local? [duplicate]

Generally speaking, should self installation by compiling source be stored in /usr or /usr/local (specified to --prefix)? When to install to /usr and when to /usr/local? E.g. I often run ...
1
vote
4answers
74 views

Change apt-get's installation path

I have a machine on which the root partition is running out of space. I have another disk on which there is plenty of free space. How do I configure apt-get to install packages on a different ...
3
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. ...
1
vote
1answer
27 views

Where (the directory) should I put my newly created module in the kernel?

I have created new module code. And want to compile it for my kernel. But I am not sure about I thing. Should I copy it to some designated directory before I start the compilation? Or I can just ...
1
vote
0answers
69 views

How to duplicate my installation partition onto a btrfs partition?

I initially installed Linux Mint 17.1 on a ext4 partition, with the /home on a different partition. The intention is to be able to multi-boot and share the /home data. I'm planning to copy it to a ...
0
votes
1answer
62 views

Copy tree directory from specific point

I am now sure how to word this, but: I am copying all the newest .zip files each recursive sub directory inside this original folder: "/Users/Stu/Documents/Hoffi Work/FTP Backup Shell ...
1
vote
1answer
43 views

Where should generated scripts be placed in the filesystem?

I am writing a piece of software (C++) which generates Python scripts. Where should these temporarily existing scripts be placed in the file system? I read a couple pages about the Filesystem ...
2
votes
2answers
58 views

copy files from the parent location when I am inside a symbolically linked folder

Suppose I have created two folders in /tmp called parent and child. child contains a file called test-child.txt and parent contains a file called test-parent.txt. Now lets go inside the parent and ...
4
votes
2answers
58 views

Where should an app save working files?

I'm designing a GUI application that works with scanned documents. It allows the scans to be manipulated before they are saved/exported, so it needs to store the data for each scanned page ...
3
votes
1answer
73 views

Linux, SVN and Dropbox — Which directory should store my svn repository?

I'm trying to set up a linux server for a small team of programmers / artists to use as a svn repository. This repository will be restricted to lan usage but will be backed up online using dropbox. ...
1
vote
2answers
1k views

The common practice to share file for all users on the same machine? [duplicate]

There is a server with several users. A user may want to read another user's files (few gigabytes) and may want to put processed files in other's directory. What's the common practice to do it? I ...
1
vote
2answers
25 views

recommended storage location for multiple users [duplicate]

Is there a conventional location to store non-secret bulk files that can be accessible by multiple users? I know that I can create a new folder (and set the right permissions) in most places in the ...
0
votes
1answer
39 views

moving binaries from bin to specific folder

I want to install RNAhybrid tool so I downloaded it and configured it. I wanted to keep in a directory called programs, so I downloaded the tar.gz in that directory, extracted it and then used ...
3
votes
2answers
2k views

What are files in `/var/crash/`?

I know when a program crashes, some files creating in /var/crash/. But I don't know what these files are! Is that error logs?
1
vote
1answer
49 views

Saving result between script executions

I have a script in /opt which is called regularly by Cron. The script needs to write and read a status flag between executions. In what directory should I store the flag? I'm thinking that /tmp might ...
15
votes
2answers
3k views

What is this folder /run/user/1000?

What is this folder: /run/user/1000 on my Fedora system and what does it do? ~ $ df -h Filesystem Size Used Avail Use% Mounted on tmpfs 1.2G 20K 1.2G 1% /run/user/1000
0
votes
1answer
43 views

Where to put files on a installer? [closed]

I have a program that I am going to package in a .deb. Where should I put files for my program? I have had a look at the structure of things like Epoptes but I cannot figure out where I should put ...
1
vote
2answers
122 views

Should I move a binary used by a non-root user from /usr/bin/ to /usr/local/bin/?

I have gone through a related thread here. A colleague of mine has copied the phantomjs binary to /usr/bin. In our system, this binary will be used only by a non-root user. At the moment, the regular ...
1
vote
1answer
119 views

Where to search for the core file generated by the crash of a linux application?

I am trying to find out the reason of crash for one of my Linux application. But I don't know where core is going. cat /proc/sys/kernel/core_pattern core.%e.%p Any Idea?
15
votes
5answers
20k 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
2answers
227 views

Where does Linux store Wifi passwords?

I am going to write a simple replacement for Ubunutu's NetworkManager. Is there any place where the Wifi network passwords would be stored in Linux? I know about ...
0
votes
0answers
30 views

Where to store the SQL Server jdbc driver file for use by all users

I have downloaded the sqljdbc4.jar file which enables connecting to SQL Server via jdbc. I currently have this in a personal folder whilst I've been testing connectivity. I'm hoping to put this file ...
49
votes
8answers
32k 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 ...
6
votes
2answers
701 views

Difference between /run and /var/run

Is there any difference between /run directory and var/run directory. It seems the latter is a link to the former. If the contents are one and the same what is the need for two directories?
0
votes
1answer
42 views

Where is <libraryname>.pc?

When installing a library with configure, make and make install, does make install copy <libraryname>.pc to some place? If yes: Where is it? If no: Should we copy it somewhere rather than ...
5
votes
5answers
5k 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 ...
1
vote
1answer
51 views

“Correct” place to store shared media on a single machine

This is a bit vague of a question, as I could just create a folder anywhere in the filesystem and set the permissions accordingly. However, I would like to know where the "correct" location to place ...
1
vote
0answers
35 views

Proper resource locations for software under /usr/local (var data like log)

I'm trying to put together a small piece of software, and I wanted to know the appropriate place to put various items if I'm setting to use /usr/local. For example, under /usr/local I will have: bin ...
0
votes
1answer
74 views

Right way of creating a local filesystem hierarchy within /home [duplicate]

I am an user with no superuser rights. I normally build and install the tools I need within my /home/<user> directory, and then create aliases to be able to run my programs. However, this is ...
0
votes
1answer
94 views

Creating a list containing filenames with paths

I have a directory(INPUTDIR) with sample names as subdirectories(508_C,540_C,570_D etc).Within those each subdirectories there is another directory called FASTQ which contains two kinds of files. ...