26
submitted 11 months ago* (last edited 11 months ago) by jackpot@lemmy.ml to c/linux@lemmy.ml

do you know that minecraft mod that autosorts your inventory? is there are project that can autosort a messy file system and put all of your files of a similar nature into a well organised, well named order. obviously this would require ai that could do image, language, and audio recognition but is there anything in the works? i can imagine this would speed up distrohopping by 10x. ai powered file management

top 30 comments
sorted by: hot top controversial new old
[-] bionicjoey@lemmy.ca 41 points 11 months ago

"Please move all of the media files in my home folder into the /home/me/media folder"

AI: moves the assets from all of your video games into one folder

[-] federalreverse@feddit.de 30 points 11 months ago

i can imagine this would speed up distrohopping by 10x

I am confusion. It seems like this wouldn't help much with distro-hopping at all. At least not the way I learned to reinstall OSes, i.e. keep /home and make sure to back up important config files you edited.

[-] jbk@discuss.tchncs.de 25 points 11 months ago

hi confusion

[-] jackpot@lemmy.ml 4 points 11 months ago

wait so how do you 'keep home', im confused explain your process

[-] bbbhltz@beehaw.org 16 points 11 months ago

Partitions.

Many distros will partition your disk as /, /home, and swap.

If you want to, when installing a different distro, you can manually format and install the system to / and not format /home but flag it to be mounted as home.

[-] cmnybo@discuss.tchncs.de 2 points 11 months ago

This can cause issues with configuration files if you change to a distro that has older versions of some programs.

[-] federalreverse@feddit.de 1 points 11 months ago* (last edited 11 months ago)

Upgrades/downgrades can always cause issues, but more often than not you're totally fine, especially during upgrades. I tend to declutter my home a little too. E.g. I keep the configurations for Firefox and Thunderbird but delete their cache, for Inkscape I may keep my custom palettes only. For a lot of Gnome tools, I just delete all the configuration, especially for stuff that I only use once a month. However, the major issue during that process for me is that accidents happen occasionally.

[-] bbbhltz@beehaw.org 1 points 11 months ago

Oh it certainly can! I haven't done it like this in a long time. My hopping days are all but over and the main things I need to backup are music, photos, and books. As long as I have them on some external drive I just wipe it all and start over. Still, though, the option is there.

[-] cybersandwich@lemmy.world 6 points 11 months ago

Typically you keep you /home on a separate drive or partition. Your /root and /swp are on others. When you install the new OS you do custom partitions and mount options install the OS on the root then mount /home to your home partition/drive.

You'll still have to install the applications again, but all of your configs and history is still there. It feels surreal the first time you do it.

[-] z00s@lemmy.world 1 points 11 months ago

Would it be possible just to copy /home to a separate drive and then point a fresh install to that location?

This is actually a great idea but I didn't separate my home when I installed my current distro

[-] halm@leminal.space 5 points 11 months ago

Yeah, you absolutely can mount a different path to /home with fstab after installation. How you decide to sort your files in /home (or have them sorted by automation) has zero influence on distro hopping.

[-] federalreverse@feddit.de 2 points 11 months ago* (last edited 11 months ago)

Yes. If you copy /home to a completely different drive, do make sure to be intentional about access rights (i.e. in your new install, you want your files to belong to you again and you want scripts to still be executable; sorting this out after the fact is possible but can be time-consuming) and make sure to copy hidden files/directories (i.e. .dotfiles, which is where user preferences for your apps are stored; if you want e.g. your Firefox bookmarks and tabs to remain with you, keep these files).

[-] EddoWagt@feddit.nl 1 points 11 months ago

Yeah I don't see why that wouldn't be possible

[-] flubba86@lemmy.world 24 points 11 months ago

Every single file on my computer is saved under ~/Downloads why would I want to sort it somewhere else when I already know exactly where it is?

[-] bizdelnick@lemmy.ml 14 points 11 months ago* (last edited 11 months ago)

Such AI can be coded in <100 lines shell script. One of simplest implementations:

#!/bin/bash

find . -type f -print0 | while IFS= read -d $'\0' f; do 
  type=$(file --mime-type --brief -- "$f")
  mkdir -p "$type"
  mv -- "$f" "${type}/"
done
[-] haui_lemmy@lemmy.giftedmc.com 3 points 11 months ago

Thats pretty much how I‘d do it. Now I need to sort through a decade of old backups and deduplicate them. Also need to distinguish between „loose“ files and program/website structures which usually have different file types inside. Probably need to auto archive them into tar.gz or something.

[-] savvywolf@pawb.social 12 points 11 months ago

Does this "obviously" have to use AI? I can see a tool that sorts files into folders based on file extensions, modification dates and/or metadata could get the work done.

And if organising files by content (e.g. "my zoo trip", "meetings with Xenia") is that important, doing it manually seems like a better idea because accuracy is presumably important.

I don't really see the distro hopping argument either. Even if you don't share your home directory between installs, presumably you copy over your files as directories rather than individually pouring them into one super folder?

[-] haui_lemmy@lemmy.giftedmc.com 4 points 11 months ago

I think a lot of folks with very limited IT knowledge think AI will solve things that have been solved for decades.

The issue is availability and elitism. A noob user doesnt know how to find this stuff, google is so rotten that its not help anymore and pros often just shit on them instead of making a comprehensive wiki.

[-] halm@leminal.space 8 points 11 months ago* (last edited 11 months ago)

This requires no "AI", just some simple rule-based automation, at most some algorithmic sorting.

  • Android (or some custom branded Android versions?) automatically save downloaded files in folders by Pictures, Documents, etc unless you tell them.not to.
  • Office365 offers the PowerAutomate function, but knowing Microsoft they probably overcomplicated things a bunch. [Edit: obviously this isn't FLOSS, just a hint at what to look for alternatives to...]

This approach never appealed to me as I want to know where things are rather than where some subroutine thinks it belongs, but I'm certain you will find plenty of software that offers an auto sorting feature.

[-] jackpot@lemmy.ml 1 points 11 months ago

sorting through thousands of audio files and putting them into relevent folders, years of legal documents, etc.

[-] bizdelnick@lemmy.ml 3 points 11 months ago* (last edited 11 months ago)

If you want to sort audio files by metadata, try easytag.

[-] rambos@lemm.ee 1 points 11 months ago

I never did that way and its not a script, but you can check if lidarr can rename and sort your music. It might require some manual work like adding artists, I dont know is it good enough for you honestly. For documents paperless-ngx can make them searchable and organized.

I know its not exactly what you are looking for, but both projects are amazing and offer something close

[-] jackpot@lemmy.ml 0 points 11 months ago

no i mean, voice recordings. basically an ai that can look at any file type across a collection of lan computers and organise them, delete duplicates, etc.

[-] techwithjake@lemm.ee 3 points 11 months ago

Maybe organize-tool would help? You have to set the parameters but I love it for getting my home folders organized.

[-] Diabolo96@lemmy.dbzer0.com 1 points 11 months ago* (last edited 11 months ago)

Maybe you're looking for Multimodal RAG ?

[-] z00s@lemmy.world 1 points 11 months ago* (last edited 11 months ago)

Lately I've been using chatGPT to create a bunch of small custom python programs to do stuff like this (if I can't easily find an existing program to do what I want).

For example I would tell it something like:

Create a python program that does the following:

-asks the user for a directory to process

-sorts the files in that folder according to file type, placing them into appropriately named sub-folders, eg all image files into a folder named "images", all music files into "music" and so on.

-creates any new sub folders before moving the files

-moves the files verbosely

-gives the user a notification upon finishing

You can customize it to do exactly what you want, and it takes only seconds for it to give you the code.

I can't even begin to tell you how much time it's saved me over the last few weeks, automating simple stuff that would normally take ages.

[-] rufus@discuss.tchncs.de 1 points 11 months ago* (last edited 11 months ago)

I think that's a good start, but the baseline of what AI can do. These scripts are around since filesystems have been invented. And you can do this with one (lengthy) shell command. Or one of the already existing file sorting utils. (something like ~~this~~ [Edit: see next comment] or Hazel or DropIt) With those you can even configure if it should recusively visit subdirectories and do individual subdirectories for the filetypes or mangle everything together for example in one big unsorted mp3 directory.

What I'm waiting for (I'm not OP) is something that looks at the content of the files. Do a directory for all the manuals I downloaded for the household appliances, find out on which event I took a photo and make a correctly named album for that, find the project files for my diverse electronics projects and file them into seperate directories together with related info. And find the mp3 files and TV recordings with a mismatch of metadata and folder structure.

[-] hedgehog@ttrpg.network 2 points 11 months ago

Someone in another comment shared a link to this - is this what you’re looking for? https://github.com/tfeldmann/organize/

[-] rufus@discuss.tchncs.de 1 points 11 months ago
[-] z00s@lemmy.world 2 points 11 months ago

I think what you're describing is definitely the way things are heading. I would love a teachable, automated AI personal assistant. But I think I'll wait for an open source, hardware agnostic version that I can self-host.

https://www.rabbit.tech

this post was submitted on 27 Jan 2024
26 points (71.7% liked)

Linux

48746 readers
1535 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS