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)

2
votes
2answers
48 views

Where do I put my systemd unit file on Arch Linux?

Sometimes these things can be hard for first-timers. Being a do-it-myself person, I read that there are two folders for unit files (not in user mode). /usr/lib/systemd/system/: units provided by ...
-2
votes
1answer
43 views

Is there a designated place for scripts that are (indirectly) automatically executed by systemd?

Arch Linux Question I recently asked where to but a systemd unit file: Where do I put my systemd unit file on Arch Linux? I would like to run a python script every 5 minutes (not to be confused ...
10
votes
4answers
8k 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, ...
4
votes
1answer
53 views

Is it possible to add a password to moving or copying specific files on Linux?

I have a directory setup very nicely(i.e organized with READMEs and easy navigation etc.). I would like people to be able to access the files in this directory maybe even copy them to their own ...
2
votes
2answers
176 views

Infinitely nested directories within /usr/bin/X11

On a terminal in Ubuntu (14.04) when I hit Tab after cd /usr/bin it gives cd /usr/bin/X11. If I keep hitting Tab, I get cd /usr/bin/X11/X11/X11/X11/X11/X11/X11 and so on. Should it be like this or ...
0
votes
1answer
36 views

/usr/share/src?

Source code is text; text is architecture-independent data (i.e., /usr/shareable). Would it be, for some reason, a bad idea to have /usr/src/ link into /usr/share/src in a Linux distro?
1
vote
1answer
37 views

How to change default directory programs get installed

I have Debian wheezy chrooted in my Android. However all its directory is in my internal memory. So, if I apt-get install something it gets installed in /data/data/.../debian/usr/local/bin directory. ...
1
vote
2answers
58 views

Unix equivalent of smart folders

What I want to do is present a directory, the contents of which are sourced from a series of other directories on the file system. It would be like a soft-link, only a link to multiple directories at ...
3
votes
4answers
6k views

How to recreate /var/lib/dpkg/status?

I have deleted some files around /var/lib/dpkg/, namely: /var/lib/dpkg/status /var/lib/dpkg/available /var/lib/dpkg/info/* I understand Debian uses these files to keep some information about ...
0
votes
1answer
57 views

usr/bin appears empty

I'm trying to make a program (Thunderbird) run at startup, but when I go to usr/bin it seems empty. However, if I run $ which Thunderbird in terminal, it tells me /usr/bin/thunderbird. The usr/bin ...
33
votes
2answers
12k 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? ...
6
votes
2answers
926 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
3answers
105 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 ...
1
vote
1answer
25 views

Is there a conventional place in Unix to store downloaded packages?

Working in a Unixy system, I am often confused by where to store downloaded packages. For example, I'm trying to install Spark on OSX, following these instructions. When I get to tar -xvzf ...
0
votes
0answers
44 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 ...
3
votes
2answers
58 views

Why do people choose different file systems for different directories? [closed]

Why is this done by the users? For what purpose? Doesn't it slow down the system? example:jfs for / ext2 for /boot reiser4 for /var so you see this there will be an interaction between different file ...
16
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
4
votes
1answer
74 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
29 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, ...
3
votes
3answers
475 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
27 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
629 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" ...
63
votes
8answers
38k 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
12k 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
128 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
408 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
139 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
58 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
26 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
39 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
577 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
3k 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
28 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
478 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
57 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
66 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
106 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
28 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
82 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
94 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
45 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
65 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
68 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
90 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
27 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 ...
1
vote
1answer
61 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?