Score:0

Show the content of child folder(s) in the parent folder

mm flag

I have a parent folder. This parent folder contains no files; only child folders. All of those child folders only contain files; no further child folders.

I'm looking for a way to show the contents (files) of all the child folders in the parent folder.

For my purpose, I just need to see all the files from all the child folders; it is of no consequence if the child folders themselves remain visible in the parent folder.

This is my own system, btw.

Chokoladekiks avatar
it flag
Is termianal view sufficient, or does it need to be in a GUI File manager?
John Willemsen avatar
mm flag
Shared over Samba/NFS/CIFS.
Score:0
cn flag

You can make files exist in the parent folder as well by creating soft or hard links to them. The following command can automatically create hard links in the parent directory:

find /path/to/parent/dir/* -type f -exec ln {} /path/to/parent/dir ;

Add the option -s after the ln command to create symbolic links instead.

Files with the same names in different child folders obviously will be overwritten in the parent folder.

John Willemsen avatar
mm flag
I could exclude existing files to have it run faster and prevent overwriting existing files every time the command is executed, but an exclusion list that's read before the actual command is executed would be even better, no?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.