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
1answer
39 views

Information leaks out of encrypted file system

If I only encrypt the home directory, what are some common ways for information to leak out to the unencrypted part of the file system? Aside from the obvious problems like swap space files in /tmp ...
0
votes
1answer
24 views

Clone directories [closed]

I have certain directory path like this /backup/data/cm/au and /backup/data/cm/ds. I have to create paths from /cm/au and cm/ds in tmp with same owner and group of their originals.
1
vote
3answers
41 views

Installing files in ~/.local

When installing software compiled from source, I normally place them in /usr/local/, which is by far the most common default in my experience, and standard practice at least on Debian and its ...
1
vote
0answers
14 views

How to mount to subdirectory of autofs

I have follong problem - I'd like to use autfs in one place to mount to subdirectory of autofs. I.e. I'd like to have something like: foo -fs=... bar/baz -fs=... The problem is that (according to ...
0
votes
1answer
24 views

Where to place application files in embedded linux deployment?

I'm building a control device that runs Debian Jessie on a ARM based Linux SBC. I'm curious what the recommended location is for application files? To date, I've been placing things in a root level ...
0
votes
1answer
67 views

Strange directories in /home

There are some strange directories appearing in /home (so far, maybe in other locations too). These directories do not show up in ls but do with bash's tab autocomplete, when doing things like cd. ...
0
votes
2answers
90 views

What's the difference between mnt vs media? [duplicate]

What is the purpose of having both? Aren't they both used for mounting drives?
1
vote
3answers
31 views

Standard environment variables for distribution-specific paths

It seems to me that there's a lot of confusion (or at least there is on my part) about how different file systems are structured among different distributions of Linux/Unix. It would stand to reason ...
2
votes
2answers
30 views

Where should an application be installed if it consists of multiple files?

I have noticed that essentially all the files in /usr/bin are stand-alone executables, rather than a directory containing the executable plus other files that the executable might need (such as ...
2
votes
1answer
20 views

Where should I install seafile-server: /opt or /home?

Reading Filesystem Hierarchy Standard I was considering those directories: /opt: Optional application software packages. /home: Users' home directories, containing saved files, personal settings, ...
-1
votes
2answers
39 views

/etc/default/sw vs /etc/sw vs /etc/sw.d/ [closed]

I've seen many software in Linux that use these three locations to store their configuration. /etc/sw /etc/default/sw /etc/sw.d/ So my question is: Why there are three places and what is the ...
6
votes
2answers
49 views

Installing programs on a removable drive

I am planning to install some software on removable media (which will presumably always be present in the computer, though it's possible that there could be occasions where it is absent). After doing ...
5
votes
1answer
113 views

Find all dirs/files that have symlinks pointing to them?

I am in a situation where I want to delete some cruft, but there might be some symlinks pointing to the cruft, so I don't want to delete those targets. Is there a command or some switches that will ...
4
votes
1answer
60 views

How should executables installed under /opt be added to the path?

Can programs installed under /opt be safely symlinked into /usr/local/bin, which is already in the PATH by default in Ubuntu and other Linux distros? Alternatively, is there some reason to create a ...
0
votes
4answers
65 views

how do I extract the SubDir name 4 deep & put into a Var 4 later use?

I need to know how to get the 4th directory name into the tree. this directory var changes while working through it using a loop, so while the loop is running always updating this directory structor I ...
1
vote
0answers
33 views

What is single user equivalent for /opt?

I'm creating the installer for my application. The app comes with specific versions of some popular libraries and binaries (Tcl/Tk and Python), so I can't install it to standard locations. If the app ...
2
votes
1answer
18 views

Read the files in sub-directories and move to single location with timestamp

I have a requirement to move all the files from multiple subdirectories into a single directory with adding timestamp to it. I am having the below directory structure, ...
0
votes
3answers
39 views

Where should I install packages built from source as a non-root user?

I'm building several (> 10) packages as a non-root user from source, and want to install them (for the sake of this question, choose the --prefix= value). Two obvious options are: Use my home ...
1
vote
2answers
206 views

what is best directory for storing uploaded files / images from my website

i am building a webpage where a the user can upload images. i am going to use the file-system to store my images. i was wondering what is the best directory to hold such data? is it /var/ directory? ...
2
votes
2answers
62 views

Where can I/should I place files outside my home directory?

I'm using a Linux system on which I don't have root. My home directory is remote-mounted and backed up (and there's a quota on that filesystem). Now, I would like to work on some files on this machine ...
2
votes
2answers
47 views

Uninstalling or updating programs installed in /usr/local

When installing programs (e.g. openmpi, comsol, lammps) to /usr/local, usually a lot of separate files are created in /usr/local/bin, /usr/local/lib, /usr/local/src etc. Now when I want to uninstall ...
0
votes
0answers
21 views

UDEV: Where do I store scripts that are used to process events using PROGRAM or RUN?

I want to RUN+='/usr/bin/nautilus' when a USB stick is plugged in. I do it on ACTION=="start", unfortunately I cannot do this directly from udev because it kills the process. This can only be used ...
2
votes
3answers
120 views

Differences between /home, /root and /usr

I've found out this topic : What is the difference between /opt and /usr/local? And this link : http://www.pathname.com/fhs/pub/fhs-2.3.html To help me understand the usages between /home, /root, ...
1
vote
3answers
82 views

What is the reasoning/design choice behind the unix/linux file system structure?

I've recently switched from using windows and I'll now be running linux on my computer. In windows there's the program files folder. Most of a programs files go into its own folder there which to me ...
25
votes
5answers
813 views

What are the alternatives to the FHS?

Please don't crucify me for asking this question. :) I'm a long time Linux user for over 15 years but one thing I hate with a passion is the mandated directory structure. I don't like that /usr/bin ...
1
vote
1answer
41 views

Where to store calibration files for a custom Linux device driver

I've been writing a Linux device driver for some measurement devices I'm attaching to my Raspberry Pi. I've created my kernel module and an application to access the character device driver, but the ...
-2
votes
4answers
130 views

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

Arch Linux Question (or any OS that uses systemd to manage processes and follows the Filesystem Hierarchy Standard by the Linux Foundation) I recently asked where to but a systemd unit file: Where ...
2
votes
2answers
276 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 ...
4
votes
1answer
64 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
253 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
47 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
2answers
106 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 ...
0
votes
1answer
143 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 ...
1
vote
1answer
64 views

How to change the default directory where 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 ...
1
vote
1answer
35 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 ...
3
votes
2answers
75 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 ...
4
votes
1answer
103 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
39 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
3answers
119 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 ...
0
votes
1answer
39 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 ...
1
vote
2answers
571 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
3answers
298 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
92 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
32 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
69 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 / ...
5
votes
5answers
1k 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. ...
6
votes
5answers
1k 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 ...
0
votes
1answer
33 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 ...
0
votes
1answer
113 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 ...
1
vote
1answer
110 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 ...