The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [directory-structure]

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

Filter by
Sorted by
Tagged with
-1
votes
0answers
7 views

Recommended Installation Folder for Anaconda

the default directory of the Anaconda (Python lib) installation script under Linux is in the user space under ~/. Why? It's annoying when backing up your home directory (tens of thousands of files ...
0
votes
0answers
10 views

Checking dirs for duplicate trees

After recovering a dir with many entries from my backup, I noticed that I got loads of duplicate files, which I could de-duplicate with fdupes e. g., but I recognized that many of my subdirs were ...
0
votes
0answers
12 views

Feature for showing last visited file system locations

I'm transitioning from MacOS to Linux. In MacOS, there a program called Default Folder X, which embeds itself into Finder (the system file browser) by adding the feature which allows one to navigate ...
24
votes
4answers
3k views

Why does '/' contain '..'? [duplicate]

There's no directory above /, so what's the point of the .. in it?
0
votes
2answers
51 views

Linux path for users' shared binaries [duplicate]

I would like to standardize on a directory where normal users would put programs/installs which would be used by other users. What would be the best practices? For instance, I could create a /users/...
0
votes
1answer
46 views

Working Syntax for Rsync Copy of a set of 2 or more Hard-linked Folder Trees while maintaining this specific archive structure?

Working Syntax for Rsync Copy of a set of 2 or more Hard-linked Folder Trees while maintaining this specific archive structure? PS: Would this be a better fit in SO or SU SE? Template of Current/ ...
2
votes
1answer
34 views

How do I get XDG_CONFIG_HOME from a shell script / command line?

Is ${XDG_CONFIG_HOME:-${HOME}/.config} enough or there are more tricks to it? Is there maybe some xdg-user-dir CONFIG or xdg-settings invocation that gives me where to expect programs' configs?
3
votes
5answers
588 views

How can I find files in directories listed in a file?

In a directory there are several subdirectories, something like: TopLevelDir +-- SubDir1 +-- SubDir2 +-- SubDir3 +-- SubDir4 +-- SubDir5 +-- SubDir6 I need to find files containing some specific ...
-2
votes
1answer
47 views

Write a recursive script to move all files one folder up [closed]

I know that there are multiple questions already asked of this type. Still, some of them still remain unanswered while, the others don't answer my query. Consider the following directory hierarchy: ...
1
vote
2answers
85 views

Is the .d notation for folders in /etc recommended or not?

When building a new software that will store a directory of configuration files in /etc, should the directory be named software_name.d or just software_name? I can't seem to find good style guides ...
0
votes
2answers
57 views

How to move some specific folder keeping a predefined directory structure?

I have a directory containing about 7k folders. These folders were extracted from zips and some of the extraction was done using Python scripts. Some of these folders are extracted in such a way that ...
2
votes
1answer
148 views

Where is libsystemd.so located on ARM devices?

I have an ARM Tinkerboard running Debian 9.8 (Stretch). Systemd version is 232. I'm working on a program that can be run from userland or as a daemon. If it is run as a daemon, then dlopen and dlsym ...
2
votes
1answer
62 views

On Debian 9, is /root part of the /home partition?

I am encrypting my /home partition and I would also like any secrets /root (not /) contains to be encrypted. Is the /root folder considered part of the /home partition by default, or do I need to ...
0
votes
1answer
395 views

Finding files and copy with folder structure intact

I am searching files who have either been created or modified for the last 60 minuts. I find these via find ~/data/ -cmin -60 -mmin -60 -type f ~ the home directory /usr/wg/ After that I want to ...
0
votes
2answers
44 views

How does IMAP physically store mails?

I am at last planning to move from POP3 to IMAP. I use maildir format to store mails and I want, at least for a short time, to keep a fallback route. I'm trying without success to find out how IMAP ...
-1
votes
1answer
299 views

How to access external hard drive from Ubuntu Shell and Python code [duplicate]

I am running out of space in my local device. I have external hard disk. I want to point my python code to write to directory there. How can I know the full path for the hard disk? I tried to go to ...
6
votes
4answers
2k views

How to find only directories without subdirectories? [duplicate]

Is there a way in linux to look through a directory tree for only those directories that are the ends of branches (I will call them leaves here), i.e., dircetories with no subdirectories in them? I ...
1
vote
1answer
129 views

Tool for creating and calling folder structure templates?

Is there a Linux utility for creating templates for directory structures, outside of the scripts packaged with a DE like Gnome or LXDE? (I run openbox and would like to avoid a DE at all costs) There ...
1
vote
0answers
62 views

AWS Linux image - where to put application directory?

I need to install my application files in the linux server. Where should I put the files? and what are the permission that I should set? Can I put them at /var/app? (AWS Beanstalk put the app at /var/...
0
votes
1answer
81 views

Trying to remove current directory using rmdir

I created a directory dir at Desktop and then i keyed in cd dir so as to make dir as my current directory and then i typed in the terminal rmdir /home/user_name/Desktop/dir from the dir directory ...
0
votes
1answer
76 views

Where should I store my application files (data, cache, logs, crashes, etc.) [closed]

Although I did some research on this subject, I couldn't reach the exact information I wanted. Actually, not exactly disclosed, everyone approached in a different way. For the: Filesystem Hierarchy ...
0
votes
2answers
132 views

What is a good command for moving a directory containing relative symbolic links to files outside the directory?

I like to use relative symlinks when possible because they stay valid even when my filesystem is mounted in a non-root location, for example if I am accessing it remotely. However, if I move a ...
1
vote
1answer
76 views

On FreeBSD, or other BSDs, what directory is commonly used for data folder storing the content of a database such as Postgres

I am wondering if there is a convention on where to store the data folder containing all the files for the tables and rows of a relational database system such as Postgres.
0
votes
0answers
49 views

What is the directory “/home/[username]/.checkers” and why is it owned by root?

This is for a website that has been passed from one WHM/Cpanel hosting environment to another. It's running the Loaded Commerce shopping cart and ShipRush shipping plugin. The ShipRush plugin needed ...
0
votes
2answers
145 views

How to create file with text in every subfolder?

For example I have a hierarchy a/b/c. How do I crate a file with name d.txt and text "Hello World" in every folder a, a/b and a/b/c?
-2
votes
1answer
54 views

A directory showing up in itself [closed]

I do cd ~ and then pwd. It shows /root. Then I do ls. It again shows root. This is NOT another directory with the same name because when I do cd root, it says -bash: cd: root: Not a directory. ...
1
vote
1answer
702 views

Creating a file named '.' and how to read and write data to it?

How would I create a file named . (dot) and read or write data to it, given that . also refers to the current directory? I know this is possible because I have a directory structure. I'm looking at ...
2
votes
2answers
939 views

What's the right way to add directories to XDG_DATA_DIRS?

I've installed some app under /opt/myapp, which has a /opt/myapp/share directory. As I finish installing, it tells me: Note that '/opt/myapp/share' is not in the search path set by the XDG_DATA_HOME ...
5
votes
1answer
4k views

Wget: downloading files selectively and recursively?

Question about wget, subfolder, and index.html. Let's say I am inside "travels/" folder and this is in "website.com": "website.com/travels/". Folder "travels/" contains a lot of files and other (sub)...
1
vote
0answers
53 views

doubts about the Linux filesystem hierarchy [duplicate]

I'am trying to learn about the filesystem hierarchy but I can't get my mind wrapped around some of the concepts. /mnt: What do I put here? In theory, is a place for mounting temporary file systems so,...
1
vote
2answers
309 views

Can you change permissions for a child directory that you do not own?

Picture a scenario in which you have a parent and a child directory. In the parent directory you have given group rwx. Below that directory you have a directory in which the group permissions are --- (...
1
vote
1answer
132 views

How to run a script file

Using Mint Linux 19 here. I have a script file called test.sh. This script-file is located in a path e.g. /home/shyam/Mi A1/tissot, and I use it to flash Android system on my phone. The script ...
0
votes
2answers
399 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
213 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
43 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
207 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
336 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
64 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
79 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 ...
1
vote
2answers
40 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
25 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
120 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
48 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
349 views

Wildcard not being interpreted in if statement

I am 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 is a gzip, if so, it runs the ...
4
votes
1answer
4k 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
50 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 ...
1
vote
1answer
2k 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
33 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
49 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
158 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 ...