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)

0
votes
0answers
23 views

Where should the node_modules folder go? (Mint)

I'm just about to install Karma, Jasmine and NodeJS to start testing for AngularJS. I'm having a tough time figuring out where to put the node_modules folder. My question is split into two parts, does ...
3
votes
2answers
42 views

Multiple tmpfs partitions

[mayur@mayur311-pc ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 50G 3.6G 47G 8% / devtmpfs 3.9G 0 3.9G 0% /dev tmpfs ...
-1
votes
1answer
32 views

Extended permissions - after set acl, group cannot write [closed]

I want to use setfacl to set permissions to dir for the users group. I do something like this: mkdir /Employee chgrp employeers /Employee setfacl -m d:g::rwx /Employee And now, when I try to create ...
0
votes
3answers
174 views

Where can I find the shell script for ls command? [closed]

I am trying to understand how the ls command works, and I presume there is a shell script which defines ls somewhere in the filesystem. This correct? If so, where can I find it?
0
votes
2answers
33 views

Man directory layout — why the subdirectories?

Man expects the man directories listed in $MANPATH or $(manpath) to be split by section into directories named "man$section". This duplicates the section information that is already available in the ...
3
votes
1answer
37 views

How to call a binary outside PATH

I recently downloaded Master PDF Editor. It's a proprietary software for Linux and the archive contained bascically only a *.desktop file and the actual binary. Looking at the *.desktop file, the ...
3
votes
1answer
24 views

Where can users' personal data be?

I want to secure my data on a multi-user system, so ful-system encryption is not an option. I encrypted /home/me with ecryptfs, the swap with cryptsetup. But I read that the applications can ...
1
vote
2answers
40 views

Are all files outside of /home/userabc owned by root?

I'm writing a tar implementation for a package manager, and I wonder if I can skip the permission setting of the user in the tar headers and keep what is there by default, the user who wrote the files,...
0
votes
1answer
46 views

How to find the parent of a file by inode

I want to use ntfsundelete to maintain the directory structure of the recovered files. The output of ntfsundelete is like this: Inode Flags %age Date Size Filename 191321 FN.. ...
1
vote
2answers
59 views

Linux file hierarchy - what's the best location to store lockfiles?

I want to synchronize processes based on lock files (/ socket files). These files should only be removable by their creator user. There are plenty of choices: /dev/shm /var/lock /run/lock /run/...
0
votes
1answer
24 views

Where should I put a standalone web app which doesn't require an external web server?

I have a stand-alone web app, it's an executable file. At this point it doesn't require nginx or apache in front of it because it has a built-in webserver. Where should I put it on a server? In the ...
0
votes
2answers
43 views

remove log files

I have a folder which in turn contain multiple sub-folders. All of these sub folders have a log folder. How to clear all the log files alone from all the log folders in these sub-directories using a ...
1
vote
1answer
20 views

What was xhbin?

I've googled, searched Unix & Linux Stack Exchange, and... well, there's not really much else I can do, is there? I was browsing some quines in various shell languages, and I came upon the ...
3
votes
1answer
32 views

Where is the recommended place to install applications that are not from apt?

The SDK for Dart comes as a zip file for Linux. I've only previously installed software using apt-get. Is there a convention for where I should put the dart-sdk folder? And should I add dart-sdk\bin ...
5
votes
1answer
65 views

What's the relevance of these bash completion suggestions?

~ is $HOME. For me, cd ~ is /home/cat. Simple so far, yes? In Bash, the following happens: cat @ mint-kitty : ~/Downloads $ cd ~ # from /home/cat/Downloads to /home/cat/, as an example, but ...
1
vote
1answer
36 views

What's the correct location to install a bunch of scripts & support files for a program?

I have a project that comprises a bunch of different files (listed below). I'm creating an install script for it, and want to make sure they all go in the right place from a unix hierarchy perspective....
1
vote
1answer
65 views

How to copy files from one directory to another so that only new files are copied? [duplicate]

How would it be possible to copy all new contents from one directory to another so that only new files are copied from the source directory (both directories have the same naming tree). For example, ...
0
votes
0answers
47 views

how do I execute a command on multiple files located in different directories at once and directing the output to a new directory

I am trying to write a script that will execute a command on files in many directories while returning the output to another directory in an organised way. I did a dry run and got some good results ...
1
vote
1answer
102 views

How to redirect file output to a different directory?

I have a program that regularly outputs files to a directory, let's say /a/b. I am utterly unable to change where these files are outputted. But for me to use them, I must first move them to, let's ...
2
votes
4answers
66 views

How can I tell my program to save in ~

I'm using a program which processes some data and then saves it to a file. It is possible to specify the directory in which the data is saved, however the program is badly written, so if I put ~ it is ...
2
votes
2answers
76 views

Grep only in files that are in certain folders

I want to grep for interesting string, but only in specific folder/file combinations, such as myfolder/myfile.out. The directory I'm grepping from may have these combinations in subdirectories of ...
1
vote
1answer
85 views

Why is /bin a symbolic link to /usr/bin?

According to the Filesystem Hierarchy Standard the /bin directory should contain utilities needed in single user mode. In practice, many Linux distributions make the directory a symbolic link to /usr/...
14
votes
7answers
617 views

Compact bash prompt when using a directory tree / filename

In a system with Ubuntu 14.04 and bash, I have the PS1 variable ending with the following contents: \u@\h:\w\$ so that the prompt appears as user@machinename:/home/mydirectory$ Sometimes, ...
-2
votes
2answers
60 views

How do I keep the /lib folder clean?

I have been installing libraries for use with c programs. Is there a way to keep the /lib folder clean? Can I use subdirectories, links, etc to manage this? It's getting pretty cluttered, I'm not ...
2
votes
2answers
77 views

Change the default program installation location?

I have learn linux recently, but i confused about how linux system works, especially about how linux handle program files, in windows all program is in one directory Programfiles (and some in Windows) ...
2
votes
1answer
52 views

What is “var” an abbreviation of?

In the context of /var is that an abbreviation for "variables"? Or what's the intention behind the naming of this folder?
1
vote
2answers
39 views

Is it possible to specify a path in which a directory name is variable?

Asking this question on mpv player and dvds, I stumbled into a more generic question: is it generally possible to specify a path in which one of the directory names is variable? Let's say that I want ...
2
votes
1answer
60 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
34 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.
2
votes
3answers
67 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
47 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
45 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
79 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
491 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
43 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
34 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
47 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
43 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 ...
5
votes
2answers
58 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
120 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 ...
3
votes
1answer
103 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
71 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
23 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, Interface/Temp/GoodsRecipt/...
0
votes
3answers
43 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
517 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
97 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
58 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
173 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, /...