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)

1
vote
0answers
33 views

How shareable is /var/cache?

I know that some subdirectories of /var/cache are pretty much shareable, for example /var/cache/pacman (in case of ArchLinux), and possibly others (/var/cache/man?), but at least /var/cache/ldconfig ...
5
votes
2answers
380 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
5
votes
1answer
50 views

How do folder name localizations work?

In Mac OS X, there are directories like Desktop, Users and Library. On localized systems, these would be named Skrivbord, Användare and Bibliotek (Swedish) But when I am in the terminal I can't ...
2
votes
4answers
157 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 ...
1
vote
0answers
31 views

Custom desktop launcher search path in Ubuntu

I know I can write a .desktop file in /usr/share/applications or ~/.local/share/applications, but can I add new folders to the search path similar to the $PATH environment variable? For example, I ...
0
votes
2answers
36 views

Where should I mount a disk to store backups?

I'm new to Unix, and wanted to give it a try. I had an old PC lying around and decided to turn it into a network based backup system to keep the data in the other PCs safe. So I installed FreeBSD on ...
3
votes
2answers
118 views

Why does find -exec du sum up differently?

I have family pictures and movies in a folder /media/data/Selbstgemacht and I'd like to find the size of all pictures. In /media/data I use find Selbstgemacht -type f -iname '*.jpg' -exec du -ch '{}' ...
1
vote
2answers
52 views

With “find /”, skip directories like “/proc”, “/sys” and similar

There are some directories that can cause problem with find, and especially find /. These are directories in which the OS creates files which are not really files. Among these directories are /proc ...
1
vote
1answer
51 views

Why do upgrades to KDM/KDE not preserve changes to configuration files?

The kdebase-workspace package on Arch Linux only preservers changes made to /usr/share/config/kdm/kdmrc when the package is updated. I need to edit /usr/share/config/kdm/Xsetup to get my monitors to ...
5
votes
4answers
261 views

Ways to organize and access frequently visited directories and files?

In my Ubuntu, I have added some frequented directories to the bookmarks of Nautilus, for visiting them quicker. Nautilus can consume a lot of memory, when it has been kept open for long and there ...
0
votes
1answer
74 views

What is the difference between ~ and / in paths [duplicate]

When I first log in to Unix on my Mac, I usually see a ~ after my username in the command line. However, if I look at the apps contained in that directory ~/Applications they are not all of my ...
1
vote
1answer
193 views

sudo chown -R $USER:admin /usr/local - revert back to ROOT?

On OS X, but may also apply to *NIX. This question was asked/answered previously, and I know it's safe to chown on /usr/local for my admin user account, which I've done to install git with homebrew ...
0
votes
1answer
32 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 ...
2
votes
3answers
327 views

Is this command safe to run from / as root

find . * -depth -print0 | xargs -0 rmdir It finds and removes all empty folders (including hidden ones) recursively. I only tired it on my home folder and a pendrive in Linux PC and it worked but I ...
3
votes
3answers
947 views

What are the world writable directories by default?

In a standard Linux filesystem, which of these common directories are world-writable by default? /tmp /etc /var /proc /bin /boot /.... .... Why are they world-writable? Does that pose ...
2
votes
1answer
73 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?
5
votes
1answer
141 views

Strange kind of “stealth” directory on Linux

I am in a Linux machine and am working with a directory that is aptly named "stealth", because it runs and hides! Take a look at this behavior: bash-3.2$ ls /net bash-3.2$ ls -la /net total 4 ...
2
votes
3answers
59 views

Where should I place my websites files with multiple vhosts?

If vhosts are enabled, where should I place my website files? /home/aunser/www /var/www/site1, /var/www/site2 /usr/local/website/site1, /usr/local/website/site2 the systems is CentOS 6.x/RHEL ...
2
votes
1answer
44 views

updatedb for a beginner

The updatedb command, as I understand it, is basically the utility that keeps the mlocate.db database file updated. And it's a good idea to keep it updated regularly. For that matter, I've kept a ...
0
votes
1answer
175 views

What are the advantages / disadvantages Linux file hierarchy has in compare to other OSs? [duplicate]

does it make any difference whether a file system hierarchy chooses to sort files by types and put them all under one directory (like all the binaries are under bin) or on the other hand sort them by ...
1
vote
3answers
73 views

mysql database no space available

I was restoring a 200 GB database into a newly installed RHEL machine. However, while restoring I ran into no space available issue. Is it possible to change the directory where the databases are ...
27
votes
1answer
1k views

Why aren't crontabs stored in user home directories?

I'm curious to know: why are crontabs stored in /var rather than in the user's home directories? It makes it a total pain to isolate these files for upgrades but I suspect that there is a logical ...
2
votes
1answer
75 views

Possible to move boot files?

I just bought an external hard drive that's 1TB. I formatted my laptop and burned Linux to it. The thing is, I also use my hard drive for other things. Can I move these boot files into a custom ...
1
vote
4answers
102 views

What code should I use to download and install my script into a user-writable directory in the user's PATH (without requiring sudo)?

Edit: places where I said $HOME/.bin I should have written $HOME/bin or any equivalent is fine. I.E, any user-writable directory that is in the user's PATH. So I have a bash script which I am ...
1
vote
1answer
69 views

Encrypt my disk but allowing to enter the password with SSH

Can you help me with this problem please? I need encrypt whole disk on Debian 7.5, (it will be work as server) but I need enter encryption password via SSH. So I need encrypt whole disk except primary ...
2
votes
2answers
45 views

Who should own files shared by a group and where should they go

I am configuring a Linux work station that will be used by a small number of users (20-30). These users will belong to a small set of groups (5-10) with each user belonging to at least one group and ...
-1
votes
4answers
247 views

How to exclude directories from `ls -R` output?

If ls -aR | grep ":$" returns ./.hiddendir2: ./dir1: ./dir3: ./dir3/.hiddendir4: then how can you update the pattern given to grep so that you only get ./dir1: ./dir3: (note that the last ...
2
votes
4answers
73 views

Is there a folder accessible to all process and users at all times?

I have a script that gathers debugging info from the running environment and I need to figure out were I can save that info. It may be called anytime: at boot when the system is running at ...
1
vote
4answers
114 views

Into which directory should I install programs in Linux?

I want to install a program in Linux and run it as a daemon. (Team Speak 3 in this case, but the question is general in nature). There is no package provided, only tarred binaries. Where in directory ...
3
votes
1answer
77 views

Is there a standards-specified location for user configuration files?

I'm talking about files like ~/.foo found on a user's home dir. I'm working on a program that reads from such a file, and I'd also like to clean up my user root directory if I can. Is there a ...
1
vote
2answers
157 views

How to know in which partition my application has been installed?

If I run df -h in an Oracle LINUX 5 server, I got below output: $ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 12G 8.8G 1.8G 84% / ...
5
votes
2answers
115 views

Why does a grep reboot the machine?

On a RHEL 6.5 Desktop, if I use: sudo grep -r foo /* my desktop reboots. Q: Why?? How to debug this? It's the third time my Desktop reboots because of this :D
2
votes
1answer
29 views

How can I know the default path for log directory?

I am programming in shell scripting, and would like to log results. Is there any way to know what is the default path storage for logfiles in my operating system? I have researched: set | grep ...
3
votes
2answers
60 views

convention regarding offline temporary data

When writing small utility programs, I sometimes want to keep small amounts of data around between executions, usually for caching purposes, but don't want the program to run as a daemon. Are there ...
1
vote
1answer
64 views

Where did this copy of my home directory come from?

I was working on a project to control my digital camera using Ubuntu and gphoto2. At one point I noticed a new "~" directory in my project folder, /home/greg/project/~. When I enter this new "~" ...
19
votes
1answer
705 views

At what point did the /home directory appear?

Originally in Unix, /usr was used for user (home) directories. So if I had a user named alex, my home directory would be /usr/alex. (Interestingly, Plan 9, the successor to Unix, still has user ...
1
vote
2answers
116 views

Location of Xorg headers on FreeBSD 10

I'm running FreeBSD 10 and I'd like to build dwm. I've installed Xorg using pkg install. Where are the headers located? Maybe I'm just old fashioned but I first looked in /usr/X11R6 ... not there. ...
3
votes
1answer
321 views

Why does installing to /usr/bin automatically install to /usr/bin/X11?

I am using the command: install ./prog /usr/bin to copy the program to the /usr/bin directory. Doing this automatically installs the prog to /usr/bin/X11. Deleting from /usr/bin also automatically ...
1
vote
3answers
94 views

Consistency in default installation directories

I am very new to Linux (Ubuntu 13.10) and having difficulty understanding the file system, particularly with regards to installing applications. In Windows, when I installed an application, it put the ...
4
votes
3answers
2k views

Adding to path vs. linking from /bin

Our sys admin installed a software (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 programs ...
1
vote
1answer
111 views

Deploying my application

When deploying my application under linux, where do I put my libraries, executable and the desktop entry file? And what about other files my program needs? For example background pictures, audio files ...
1
vote
3answers
193 views

Where to put wrapper scripts?

I created some scripts for administrative tasks etc, I made them to be independent from environment - every dependency is injected through arguments. However it is annoying to provide to script ...
2
votes
2answers
78 views

Should my /usr/local/bin be 700 permissions?

I just installed npm and node.js, and I couldn't access npm. And I'm like "why?" and my OS is like "because /usr/local/bin is at 700 permissions" and I'm like "should it really be that way?" ...
3
votes
1answer
110 views

Redirect home to shared NTFS partition

I've installed windows 7 and linux dualboot. My partitions are: /dev/sda2: UUID="EC328C61328C329E" TYPE="ntfs" /dev/sda3: UUID="800E88610E8851D8" TYPE="ntfs" /dev/sda4: ...
1
vote
1answer
71 views

Server socket location, startup and monitoring

I'm writing a server on a shared development desktop that moonlights as a server. This is my first attempt at writing a linux server for someone else on a shared box. I'd like to conform to unix ...
2
votes
2answers
302 views

Directory structure for mounted disks in network storage

I have recently built a small homeserver, that I want to use as a NAS besides other applications like hosting VMs etc. The disk space should be accessible via NFS, SAMBA (and SSHFS), but that's not ...
2
votes
1answer
101 views

What is the tmp folder in /var?

I have a tmp folder in /var and it has the file channel.xml in it. I don't know what this is and if it should be there and what permissions it should have because at the moment it is wide open. Also ...
6
votes
2answers
416 views

Linux File Versioning?

We are migrating from A VMS environment to a Linux environment for some old alpha servers we are decommissioning. The one challenge I have not been able to overcome is file versioning. VMS keeps ...
5
votes
3answers
360 views

Splitting the Home dir two different partitions

I run a Ubuntu desktop environment with two harddisks. A small SSD and a large regular disk. Currently i run a setup where my home drive is located on /home/name, but some folders e.g. Downloads ...
3
votes
3answers
95 views

How do I search all subdirectories to find one with a certain name?

Let's say I have a top level directory called /dir and many sub directories. How do I search the subdirectories of /dir to find the one called x/x/dir/x/x/x/target? This question is similar to, but ...