Ask Your Question
0

folder view of files in subdirectories in a flat layout in ext4

asked 2016-06-19 06:37:06 -0500

JetStream gravatar image

updated 2016-06-25 06:57:25 -0500

Is it possible to create a folder in ext4 that acts like a view listing files in subdirectories of a folder in a flat layout?

Background: I use a DLNA app (BubbleUPnP on the Android phone) to play slideshows to the TV of photo albums hosted on my Fedora file server through minidlna. Minidlna shows the directories of photos laid out in albums. Slideshow of each album needs to be started individually - per directory. It would be nice to be able to create views spanning multiple album directories.

If it was possible to create a folder that acted as a view - all files in the photos directory and subdirectories showing up as a list, the DLNA app could play the slideshow of all photos in a single step rather than have to play each album individually.

Say views like:

The directory /path/to/all/ shows all files in 

/home/Pictures AND files in its subdirectories (recursively) AND
/home/Photos AND files in its subdirectories (recursively)

Any app would then see /path/to/all containing all the files contained in various different directories as if they exist in a single directory i.e. /path/to/all

Can this be done in any way?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-23 23:55:04 -0500

subpop gravatar image

I don't know much about ext4, but I would approach this as a tool/script. Create a script that finds all the files you want and hard-link them into your "all" directory.

find -type f -iname "*.jpg" -exec ln "{}" /path/to/all/ \;

Would something like that do it?

edit flag offensive delete link more

Comments

Does this need to be executed as a script?

I tried so. What am I missing?:

find /directory/containing/photos/in/subdirs/ -type f -iname "*.jpg" -exec ln "{}" /media/downloads/temp/allphotos/

output

find: missing argument to `-exec'
JetStream gravatar imageJetStream ( 2016-06-25 07:24:12 -0500 )edit

You need the \;. It's bash's way of telling find to end the command you want to execute with -exec

subpop gravatar imagesubpop ( 2016-06-27 00:28:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-06-19 06:37:06 -0500

Seen: 128 times

Last updated: Jun 25 '16