4

Libraries are one of the features I like about Windows 7 (admittedly, I haven't delved to deeply yet). Anyone using a similar concept on a Linux system? I figure UnionFS could work, but I've not played with that (yet).

So is anyone doing something like 'libraries' on Linux, what's your setup, and how do you like it?

About Libraries: My understanding is that they group different directories together into a single searchable/browsable 'directory'. For example, your 'music' folder could contain your music, the music in your computer's 'public' directory, and the music on a shared (Windows Vista/7) computer. As far as I know, they would be 'merged' together into a unified folder.

Update: The search utilities are good options; however, I'm also interested in methods that create an actual file system path, that can be used as the source in other apps (for example, group music from different locations to use in a media player). Sure symbolic links could be used, but I believe Win7 libraries show the contents of all directories in the 'library' directory.

3
  • The idea is very like 'tagging' as long as the original file locations are unchanged (and file metadata retained).
    – nik
    Sep 25, 2009 at 3:05
  • I recollect a friend experimenting with python scripts on unix to get this 'tagging' effect. This was in the early days of Google I guess.
    – nik
    Sep 25, 2009 at 3:06
  • this sounds like something doable via FUSE, but i'm not sure where to start or what might already exist... Nov 20, 2009 at 18:22

4 Answers 4

4
+50

Things that I found, that seem to do what you need:

1
  • trackerfs seems to mirror the actual 'library' directory. That seems to make metatracker a complete solution.
    – Tim Lytle
    Nov 26, 2009 at 17:54
1

Beagle is a good alternative for Linux, Tim. I must say I only gained an interest in it after seeing Libraries in Windows 7. I agree with you this is indeed a great interface addition to the operating system. And they can be used for a lot more than just media files. Currently I'm already indexing and organizing projects in different programming languages, technical documentation, etc.

Gaining an interest in this, I searched for a good alternative in Linux. And Beagle does the job. Not exactly the same way. But wanna a bet it won't be long? :)

Alternatively, you can try Meta Tracker. I haven't tried it yet (it's on my list... for sometime) but it does offer a Windows Library type of feature through it's own Object Store.

1
  • In the process of checking those two out.
    – Tim Lytle
    Nov 9, 2009 at 5:28
1

In Linux you can use hard and symbolic links to create virtual directories.

Taken from Windows-to-Linux roadmap: Part 2

A link is a reference to a file, so that you can let files be seen in multiple locations of the file system. However, in Linux, a link can be treated as the original file. As far as other applications on the system are concerned, a link is the original file. When you make edits to a file through the link, you are editing the original. A link is not a copy. There are two kinds of links: a hard link and a symbolic link.

A hard link can only reference files in the same file system. It provides a reference to the file's physical index (also called an inode) in the file's system. Hard links do not break when you move the original file around because they all point to the file's physical data rather than its location in the file structure. A hard-linked file does not require the user to have access rights to the original file and does not show the location of the original, so it has some security advantages. If you delete a file that has been hard linked, the file remains until all references have been deleted as well.

A symbolic link is a pointer to a file's location in the file system. Symbolic links can span file systems and can even point to files in a remote file system. A symbolic link shows the location of the original file and requires a user to have access rights to the original file's location in order to use the link. If the original file is deleted, all of the symbolic links become broken. They will point to a non-existent location in the file system.

Both types of links can be made with the command ln . By default ln will make a hard link. The -s switch will make a symbolic link.

Create a hard link from MyFile in the current directory to /YourDir/MyFile
ln MyFile /YourDir

Create a symbolic (soft) link from MyFile in the current directory to /YourDir/YourFile
ln -s MyFile/YourDir/Yourfile

In the above examples, MyFile, /YourDir/MyFile, and /YourDir/Yourfile are all treated as the same file.

1
  • 1
    I understand how symbolic links work (I used the quite frequently), what I'm looking for is someone leveraging them (or UnionFS, or something else) for functionality similar to the Windows 7 libraries - how they did it, how well it's working, etc. As mentioned in the question, symbolic links don't exactly mirror 'libraries' as I believe libraries show the contents of the 'linked' directories in one place.
    – Tim Lytle
    Nov 23, 2009 at 15:35
0

Also look at UnionFS...

Unionfs is a filesystem service for Linux, FreeBSD and NetBSD which implements a union mount for other file systems. It allows files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system. Contents of directories which have the same path within the merged branches will be seen together in a single merged directory, within the new, virtual filesystem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .