Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [directory-structure]

The layout of the directory hierarchy — questions like “where does this file belong?” or “what is this directory for?”.

0
votes
2answers
20 views

mksquashfs: how to include full absolute directory paths inside the squashfs image?

When I create a squashfs image from multiple directories such as: /bin/ /usr/bin/ /usr/local/bin/ /some/other/random/folder/ /another/long/path/ If I use command... mksquashfs /bin /usr/bin /usr/...
0
votes
1answer
77 views

Why is ls -i slower than ls?

I know that ls lists the names of the files in a given directory and ls -i shows the names and the inode numbers. But why is it slower? EDIT: This happens with big directories The names and the ...
0
votes
1answer
18 views

Conventional directory for application build source [duplicate]

I know this is rather subject to opinion but what are some good choices where on the file system to locate the source code of a build that the server builds (let's say it's a build/integration server)?...
-1
votes
1answer
40 views

Why do relative paths that traverse a symlink in reverse resolve using the true path?

Either I've completely misunderstood something about symlinks (most likely), or their behaviour has changed at some point and I'm now catching up. I have a script directory that resides somewhere on ...
10
votes
1answer
301 views

Have group permission but unable to create file

This question is originally posted on rsapberrypi stackexchange. Since it is not so raspberrypi-related, I think it's better to post here. I found a strange thing while playing with pi3B. I want to ...
0
votes
3answers
50 views

Solution to change directory passing a directory pattern as the parameter

I'd like to get any script or Linux solution to implement changing directory passing not exactly a directory but a pattern as the parameter. Something like this: # Ex: I'd like to execute a "cd" to a ...
1
vote
1answer
39 views

How to Define Custom Conditional Expression Primaries in Bash?

How would I redefine and/or define new conditional expression primaries in bash? For example, I would like a primary that tests for the existence of an empty directory. Of course, it would be ...
0
votes
0answers
131 views

What is the difference betweeen “~/.local/share” and “~/.local/share:”?

Under my ~/.local directory I have two sub-directories named share: and share. Upon inspection, there seems to be little difference between the two, both of them containing, as you'd expect, local ...
1
vote
2answers
32 views

copying files recursively without preserving directories

I have a bunch of directories that contain MP3 files inside. These directories contain no other directories inside. How do I delete all directory structure without deleting the files? That would be ...
1
vote
0answers
22 views

Listing only shallowest directories containing no files, all the way down

Supposing this file system structure: ROOT DIR1A FILE DIR2A DIR2B DIR3A DIR1B DIR2C DIR2D DIR3B DIR1C DIR2E ...
0
votes
2answers
63 views

Can't install to Cygwin's MinGW sysroot (it's protected)

I have built a library with this command: $ ../configure '--host=x86_64-w64-mingw32' --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw && make && make install Installation fails ...
2
votes
0answers
43 views

Exclude sub-directories from tree output [duplicate]

I would like to document a directory structure, and installed tree to do so. I don't wish to include files but only directories and symbolic links which point to directories (haven't decided if the ...
2
votes
2answers
148 views

Wildcard not being interpreted in if statement

I am somewhat of a newbie to Unix, and currently writing the below script. The code looks at a certain directory for a filename inputted by the user. The script first checks to see if the input file ...
2
votes
1answer
795 views

Is there a home directory location for overriding icons?

There are a few home directory locations that complement /usr locations. Files in these locations override their /usr counterparts. For example: ~/.local/bin complements /usr/bin ~/.local/share/...
2
votes
2answers
48 views

Where do I install non-end user commands?

In a project of mine I have a couple of specialized commands which are only called by other commands, and are not supposed to be invoked by the end user. Should these internal commands be installed in ...
0
votes
1answer
153 views

How to prepend a directory to files placed in a tar archive?

I want to tar the files foo and bar into a tar archive archive.tar, but I want them to appear, within the archive, as being within a directory, bazdir. Thus when I untar someplace I want bazdir to be ...
0
votes
1answer
29 views

Merging Directories Based on their Suffix

I have a directory structure produced during archiving. The archiving system can't be changed. Whenever a duplicate directory occurs the archiver appends an integer suffix to the directory name. My ...
0
votes
4answers
43 views

How can I do subdirectory manipulation in shell?

For example, running a command on n-number of sorted subdirectories, where n is an input. Or how can I run a for loop on a range of subdirectories where I can give that range as an input? Like the ...
1
vote
1answer
93 views

Should I install programs directly into /usr/local or a subdirectory in usr/local or into /opt? [duplicate]

I want to install PHPStorm IDE on my PC. The Linux version is distributed as a .tar.gz archive which contains bin, help, jre64, lib, license and plugin directories and 2 text files. I have searched ...
1
vote
0answers
121 views

${HOME}/Desktop directory somehow got moved in Linux Mint

I started up my laptop PC today and the Desktop directory inside my home folder has somehow been moved into a place other than ${HOME}/Desktop and another Desktop directory exists inside my home ...
0
votes
1answer
104 views

The content of directory /dev/fd have difference file in one time

I have such command. #echo -e "ls\npwd" >test #bash #exec <test After this code.You will find #ls /dev/fd 0 1 2 3 #cd /dev/fd;ls 0 1 2 255 Fun,the directory /dev/fd have ...
1
vote
1answer
18 views

Proper location for software on non-boot partition

I've got a computer that boots off an SSD, with an HDD for miscellaneous user data (currently, my /home partition). I want to move some installed software from /usr/local/bin to a directory on the ...
0
votes
1answer
90 views

lftp changes directory size without changing files in directory

i used this code to backup a directory to an ftp mirror -R /media/root/7CBAA4537758FCA/SAVE/DeesBootCD_SlipStreamed2/ /luksftpmnt/put-into-images-folder/DeesBootCD_SlipStreamed2 and it worked well ...
2
votes
4answers
1k views

Is the bin/ directory for storing binary files?

I have seen many tutorials saying that the bin directory is used to store binary files, meaning there is only 0 and 1 in the files in that directory. However, in many cases, I see files in bin that ...
1
vote
1answer
128 views

$HOME/.cache - on a small SSD or on an HDD?

I have a system with a small SSD (about 90 GB available for my single Linux partition mounted as /) and a much larger HDD. Now, my home directory has been balooning in space, filling up all of the ...
2
votes
2answers
327 views

The different uses of folders in the / (root) directory

There are a lot of folders in the / directory what do they all do? I know a few like /dev has links to devices in the system but what about /lost+found or /proc I just am curious.
1
vote
0answers
25 views

Which subfolders of $HOME should I put on a scratch disk, and which on a backed-up one?

On my computer at work I have Fedora 24 installed (not my choice). My home folder is NFS-mounted and backed up routinely. I also have a pretty large local disk which is not backed up. Now, I've been ...
2
votes
3answers
438 views

Why isn't the var directory user-specific?

I'm quite new in the UNIX world, so feel free to let me know if my question is silly. So-called Filesystem Hierarchy Standard states that the /var directory is supposed to keep data like logs and ...
3
votes
0answers
87 views

Where should be located a web application in Linux?

Here is an example of the file structure of a Linux distro: https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-filesystem-fhs.html Each directory has a specific purpose, and seems like a ...
0
votes
2answers
420 views

Tar --absolute-names flag does not work

I would like to put everything into an archive from a given directory, while also saving the whole dierctory layout, so superior directory names would be required. I run the following command: tar --...
4
votes
3answers
3k views

How to find a depth of a directory

Is there a way to find a maximum depth of given directory tree? I was thinking about using find with incrementing maxdepth and comparing number of found directories, but maybe there is a simpler way?
0
votes
2answers
87 views

File containing directory structure

I'm currently doing a CTF challenge and have extracted what I assume is the flag by injecting a relative path into the $filename parameter of a call to the PHP function file_get_contents($filename) ...
0
votes
1answer
470 views

help for user permissions and file directory access mac OS Sierra

Im trying to sort my usrers and usser permission in terminal to install Ruby gems and other libraries, but getting nowhere because of the permissions denied errors. Steps I tried: Had a call with ...
0
votes
2answers
48 views

Installing “duplicate” on SSH /home/user

I am on a SSH server and want to use a program that is at /usr/local/bin but I don't have permission. So I copied the program installation files from my system to my user on the server in order to ...
2
votes
1answer
40 views

Is there a standard directory to keep software projects shared by multiple users?

When working on source code (for example, a python project) that needs to be accessed by multiple users, is there a standard place to keep those projects? I found this answer which suggests /usr/...
12
votes
4answers
3k views

Standard location for holding software source files

Is there a standard location in Linux for holding source files for example OpenSSL. I am building Nginx from source with non default version of OpenSSL. I need to download and untar OpenSSL and I did ...
3
votes
1answer
220 views

In Linux I'd use “/opt” for custom software. In FreeBSD?

Where should I install "add-on application software packages" or "for software not managed by the system packager"? That is, software compiled by myself from sources or what-not. In Linux I'd choose /...
7
votes
2answers
2k views

Why would a directory have the sticky bit set without the executable bit?

In Ubuntu 14.04, listing the contents of the directory /var/spool/cron with ls -l provides the following permissions on the directories within (irrelevant columns snipped): drwxrwx--T daemon daemon ...
0
votes
2answers
140 views

Where should sshfs mounts be placed in the filesystem?

I have some sshfs mounts which I want to put in a Linux filesystem location following the Filesystem Hierarchy Standard. The standard is strangely silent on where network mounts should be placed: ...
-1
votes
1answer
149 views

Change Kernel recipe used by qemux86 machine

I've decide to change the Kernel which is used by Yocto (as a learning exercise) but i don't know where the Kernel which is used by Yocto is stored. I understand that it is stored in a recipe but i ...
1
vote
1answer
316 views

Kernel modules folder doesn't match uname -r

I have a fresh install of Arch Linux. I am unable to use modprobe to set up kernel modules. When I run sudo modprobe r8169 (for example), I get the error modprobe: FATAL: Module r8169 not found in ...
0
votes
2answers
227 views

Nautilus shows files in Trash, can't be located on cli

When browsing to trash:/// in Nautilus, I see a long list of files and directories that I recognize and remember placing in the trash. However, attempting to delete them from Nautilus either results ...
1
vote
1answer
58 views

What is the per-user correlate of /usr/share?

At a low level, /usr/share/geany.glade does configure some important aspects of Geany which are not controlled by geany.conf (e.g., visibility of the menubar). Copying a modified geany.glade file in ~/...
10
votes
4answers
479 views

How to extract a specifically named folder from a recursive directory, delete the others?

I realize the title is vague, best explained with an example. I have this kind of directory tree that is obtained from unzipping a zip file: x -> y -> z -> run -> FILES AND DIRECTORIES HERE So ...
4
votes
1answer
77 views

GNU autotooling, where to install shell functions?

I have a tiny project that configures and installs some shell scripts using GNU autotools. Now, the scripts will have to source a common file containing some shell functions. Where should this file ...
1
vote
0answers
41 views

ls: cannot access nav.php: Structure needs cleaning [duplicate]

I have a problem with one file, which is located in my /var/www/html order on my raspberry pi which runs apache2 and php. Before I restarted my pi, the file was totaly normal reachable. Now I got the ...
0
votes
2answers
59 views

Can packages be installed into /bin?

From the amateur knowledge that I have, I know that /bin is where all the system needed packages are present which can be used to debug and work if the system faces any problems, in short packages ...
6
votes
2answers
369 views

Consequences of having a long $PATH environment variable?

The feature I'd really need is to be able to create "virtual directories" by merging a collection of real directories (so that your /usr/bin is actually a virtual thing that points to an array of ...
3
votes
1answer
53 views

Swap directories in tree, from /dir1/dir2/dir3/dir4 to /dir1/dir2/dir4/dir3

I've got list of directories like: stats/gauges/stock/market/PLN/EUR/* stats/gauges/stock/market/USD/EUR/* stats/gauges/stock/market/PLN/CZK/* and hundreds like these. I need to change to order of ...
2
votes
2answers
106 views

Moving files and renaming using a portion of directory structure and a portion of current filename

So here's current path: ../CAMERA3/serialnum/2016-12-19/001/dav/07/07.02.53-07.03.14[M][0@0][0].dav here end goal: ../CAMERA3/2016-12-19_07.02.53-07.03.14.dav So I'm basically trying to figure out ...