this post was submitted on 18 Aug 2023
-29 points (32.9% liked)

Linux

48224 readers
624 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
 

I run Mylar on my Xubuntu server to manage my comic collection. I found out recently that there's a tool that can convert the embedded .jpgs to .webp to save space, but it only works on cbz files and not cbr (zipped vs rar for those who don't know). I wanted to convert all of my cbr to cbz so that I could run the tool on all my comics, so I needed to search hundreds of subdirectories for them and move them to the same folder to be processed.

Under Windows, I'd just type *.cbr into the search bar built into Explorer from the root comic directory, hit enter to get a list of files, select them all, and move them to the new folder. On Xubuntu, it's nothing like as simple.

I found the search option in Thunar which opened Catfish, typed in *.cbr, and got a no files found message. After looking through the very limited options, I started searching for a way to do it. About thirty minutes later I'd found dozens of links telling me to use different, Terminal only, tools, but nothing about how to search subdirectories from the Catfish GUI. Purely by accident, I found a post from 2012 that mentioned the fact that Catfish doesn't use wildcards, so just search with .cbr, something that's not mentioned in the official docs.

I tried it, and it searched the subdirectories too, and found my files! Except there was no way to copy or cut and paste, just open, show in file manager, copy location, save as, or delete. No good options for almost 500 files across several dozen locations.

I ended up asking Chat GPT how to do it, and doing it through the Terminal, using this:

'find . -type f -name "*.cbr" -exec mv {} /path/to/destination ;'

This is pretty basic functionality, and I had to resort to getting help to use the Terminal :(

top 50 comments
sorted by: hot top controversial new old
[–] Backslash@feddit.de 58 points 1 year ago* (last edited 1 year ago) (5 children)

Anyone expecting to use Linux the same way they are using Windows, without any changes, is going to be disappointed. You cannot reasonably expect to keep the same learned workflows from one system and use them on a completely different system without having to at least tweak some of it.

Learning is part of such switchovers, and loudly complaining that "Thing X is not working like I know it to, this is why people don't like Linux" is not making anyone more likely to help you nor is it going to solve your problem. I'm glad that you managed to find a way to do what you need in any case, and maybe that command will stick around in the back of your head for when you need something similar sometime in the future :)

[–] FigMcLargeHuge@sh.itjust.works 16 points 1 year ago

Yup, the exact thing OP is complaining about is exactly why I prefer to use Linux.

[–] Millie@lemm.ee 10 points 1 year ago

Right, but this is fundamentally at odds with the 'Linux for everyone', 'Linux for gaming', and 'Linux can replace Windows for most use cases' rhetoric.

If you enjoy Linux for its own sake and you like fiddling around with it and learning its ins and outs, it's fantastic. But if you just want the OS to get out of the way so you can get back to what your were doing, it leaves some room for improvement.

We can't have both, and that's fine. There's also an argument to be made for people getting used to dealing with a command line because it's something of a prerequisite for getting away from increasingly shady corporate overreach. But that doesn't help me when the solution to getting my extra mouse buttons and precision mode is to create a well documented bug report for Solaar and then wait. I just want my push to talk to work, you know?

That gap is definitely shrinking as time goes on, but it's still an obstacle and it'll always be part of the conversation around GNU until it's no longer a concern for one reason or another.

[–] ReversalHatchery@beehaw.org 5 points 1 year ago

The problem here is not that things work differently, but that GUI programs are often just dumb, or have the functionality but in a very strange way. And I'm not a new Linux user.

[–] Tippon@lemmy.dbzer0.com 5 points 1 year ago (3 children)

You're missing my point. It's not a case of me wanting to do something in the same way that Windows does it, it's a case of the Linux way is massively over complicated for no good reason.

Yes, the terminal is vastly more powerful, but there's no reason at all that you should be forced to use the terminal for something as simple as this.

[–] gerbilOFdoom@beehaw.org 8 points 1 year ago* (last edited 1 year ago) (1 children)

Terminal isn't over complicated, it's the most basic interaction with operating systems and was the first mainstream UI to ever exist because it's a natural extension of what interacting with a computer truly is.

Terminal has very basic, particular syntax: Command [required parameters]

It has some useful additions as well, like

| to pass the output of the precious command to another command

> to write to a file

< to read from a file

This basic structure allows additional tools to be installed and run without having to learn a unique GUI with all the quirks of the GUI designer for each application. You just add new commands and move on with your life, maybe referencing the manual page to check which parameters you need.

Windows has a very particular GUI design that everyone knows because of the way Microsoft captured the market in the early days, before laws prevented them from doing so. Windows is esoteric, it has a variety of GUI philosophies all jumbled together. Explorer/control panel exists next to "Metro" apps, now "Windows apps" and they both do separate things without ever integrating the two properly.

Windows is arcane and understanding it fully is thousands of hours of practice, if you actually try new things. Linux is perfectly usable from command line with just a few dozens of hours of practice.

I say all this as a primarily Windows desktop user who uses Linux when it comes to actually getting things done. If we taught Linux to our children in schools and if businesses provided as much Linux training to workers as they do windows training, the discussion we'd be having would be about how windows is too complicated and just needs a UI similar to the ones available with Linux.

[–] ReversalHatchery@beehaw.org 2 points 1 year ago (1 children)

Command [required parameters]

Aren't the kinds parentheses the other way around?

[–] gerbilOFdoom@beehaw.org 1 points 1 year ago

Probably? I didn't check on whether angle brackets or square brackets are for optional parameters. It's an arbitrary thing and my meaning is entirely decipherable in any order.

[–] Remmy@kbin.social 5 points 1 year ago

It's not complicated though. It's just different than windows. It's also not an issue with Linux. Thunar just doesn't behave the way you want it to. Files in GNOME works fine, but wildcards don't require a * to search.

[–] skai@sh.itjust.works 3 points 1 year ago (1 children)

It's not complicated -- it's familiarity. I have used Linux as my daily driver for quite a few years now, so the moment I read your problem I was already crafting the find / mv command in my head as how I would resolve the problem. I am more familiar with it, it doesn't feel complicated at all to me -- I'm telling the computer to find a pattern, and then move the results (literally the name of the commands!). That feels really straight forward to me because I'm used to it and it's in my comfort zone. Because I don't use Windows much (really only at work, and only to run Word or Excel) it actually took me a second to figure out how I would do it in Windows (at first, I was thinking a Powershell script), and I didn't even realize that when you search in Explorer you could bulk-move the results (although I should have, that's pretty logical functionality and like I wrote I do use Windows at work albeit in a non-technical way!). Essentially, often when I have to do anything even marginally complicated on Windows, I feel the same frustration you do because it's not intuitive (to me) and it would be so much easier if I was only using the system with which I am more familiar.

I won't suggest that the Linux console is easier for most users, the way we use technology in our lives (and not just desktop processing) automatically makes the Windows interface more familiar to most people. I do totally recognize that if we do want Linux for the masses or whatever cute phrase is being used to promote Linux desktops for mom and dad and business then we have to adapt to what most users are familiar with.

load more comments (1 replies)
[–] iamdanno@lemmy.zip 2 points 1 year ago

I read it more as: "The way to do this (normally simple) thing is incredibly cumbersome, and could be greatly improved.

[–] Justin@apollo.town 26 points 1 year ago (1 children)

This is a Thunar issue, not Linux in general. It works with Dolphin's filter bar.

[–] Lucia@eviltoast.org 14 points 1 year ago

That isn't even a Thunar issue anymore, it was fixed in the last version half a year ago. It's more about stable release distros provide inferior experience yet again.

[–] hypelightfly@kbin.social 21 points 1 year ago (1 children)

This will search through whatever directory you select (and all subdirectories) for cbz, cbr, zip, or rar files. It will check the contents of each file to determine if it contains any jpg or png files. For all cbzs with jpg or png files, it will extract all data to a temp folder, convert the jpgs/pngs to webp images, and then create a new cbz file with the converted images. Any other contents of the cbz (such as ComicInfo.xml) will be retained. The final file will overwrite the existing file, so ensure you have a backup first.

https://github.com/azuravian/cbz_jpg-to-webp

All that for something that was unnecessary in the first place. The tool you're trying to use already supports the file format you have and works recursively. No need to move files or convert them first.

[–] Tippon@lemmy.dbzer0.com 5 points 1 year ago

Yep, and that's very frustrating. I replied to someone else while you were writing this, but the gist of it is, I read somewhere else that it couldn't handle cbrs yet, and did the prep before I checked. I should have done it the other way around, but it's done now :/

[–] dudeami0@lemmy.dudeami.win 16 points 1 year ago (2 children)

If you are expecting a more windows-like experience, I would suggest using Ubuntu or Kubuntu (or any other distro using Gnome/KDE), as these are much closer to a modern Windows GUI. With Ubuntu, I can use the default file manager (nautilus) and do Ctrl+F and filter files via *.ext, then select these files then cut and paste to a new folder (drag and drop does not seem to work from the search results). In Kubuntu, the search doesn't recognize * as a wildcard in KDE's file manager (dolphin) but does support drag/drop between windows.

[–] eager_eagle@lemmy.world 7 points 1 year ago* (last edited 1 year ago)

dolphin doesn't recognize * but searching for .ext will list all files in all directories with .ext, so you don't need the wildcard.

[–] Tippon@lemmy.dbzer0.com 3 points 1 year ago (1 children)

Thanks for replying :)

I don't want a more Windows like experience, I'm just shocked that something as basic as moving files requires the terminal in Xubuntu. It's just Ubuntu with a different desktop environment, it shouldn't force me to the terminal for basic tasks.

Catfish lets me find the files in the same way as you said Nautilus does in Ubuntu, but it doesn't let me do very much with them. It seems pretty pointless.

[–] petey@aussie.zone 5 points 1 year ago

Unfortunately the choice of desktop environment matters a lot when talking about features like this

I suggest trying KDE instead, as XFCE is far from the user friendly interface your used to with Windows. Some DEs are good for new users, XFCE isn’t one of them

Whoever suggested Xubuntu for a Windows user is a bit optimistic

[–] JTode@lemmy.world 13 points 1 year ago (5 children)

What I find befuddling about this is, you figured out what you needed to do, ie, you had a victory and discovered something new, and you find that somehow bad. You just did some practical console magic. By design, GNU/Linux can do a whole lot more with just the console and piping. Dive in.

load more comments (5 replies)
[–] Kangie@lemmy.srcfiles.zip 9 points 1 year ago* (last edited 1 year ago) (1 children)

I'm sorry to see so many "Don't expect Linux to work the same way" responses.

Have you tried logging a bug requesting the functionality? It seems reasonable.

I'd like you to consider another workflow, too - if you take the knowledge that you've gained about using find and -exec you might find that you don't even need to move them all to one place to preprocess - you could probably find, convert to cbz, and run through the webp conversion all in-place. You could probably even use find ... | xargs and some trickery to do it in parallel quickly.

It's not unreasonable to expect bash skills on a server; it's incredibly uncommon for servers to even have GUIs, and your use case probably hasn't been considered by the developers.

I would just mention 'I want to select and copy/move multiple search results' as the bug and ignore your specific context though. :)

Edit:

It's the rather snappily named cbz_jpg-to-webp by azuravian and the Github page is here:

https://github.com/azuravian/cbz_jpg-to-webp

I'd suggest reading the docs though; it supports cbr and cbz.

[–] Tippon@lemmy.dbzer0.com 4 points 1 year ago (1 children)

I’m sorry to see so many “Don’t expect Linux to work the same way” responses.

Thank you, it is a bit infuriating. There's a definite feel of if you don't like how something works, you're not a part of the clique, and must be a Linux bashing noob.

The reason for moving them was that I use Mylar. It processes comics and should automatically convert them to cbz and move them back to the correct directories. Part of the workflow should be that it tags them and updates the comic info too. I had some files that I'd put in place before turning that option on in Mylar, but it only converts files that it thinks are new, hence the move.

I’d suggest reading the docs though; it supports cbr and cbz.

Somewhere on a forum or another site, I'd read that the cbr support wasn't working properly yet, but didn't think to confirm it before trying to convert the files. I've been burned by comic converters in the past, so wanted to prep everything first. Lesson learned though :)

[–] Kangie@lemmy.srcfiles.zip 3 points 1 year ago (1 children)

You should be able to report the bug / request the enhancement here. :)

https://docs.xfce.org/xfce/thunar/bugs

[–] Tippon@lemmy.dbzer0.com 2 points 1 year ago

Thanks for the link :)

I'll send one as soon as my backup is finished/

[–] fubo@lemmy.world 8 points 1 year ago (1 children)

Shell commands are vastly more powerful than mouse actions.

It's like the difference between being able to speak to someone using a shared language, versus only being able to point and grunt to get what you want.

The more you learn about using the shell, the more you'll be able to do things very quickly and flexibly, without having to find an app that someone else has already written to do the precise thing you want.

[–] Tippon@lemmy.dbzer0.com 4 points 1 year ago (1 children)

Yes, shell commands are more powerful, but you shouldn't need to learn a new language to do something as simple as waving hello to someone else.

What's the point of a GUI file manager if it can't handle very basic file operations?

[–] fubo@lemmy.world 2 points 1 year ago

Native speakers of the Unixish language (as it were) wouldn't expect to use a mouse-clicky tool to do this sort of operation, because the shell is always there.

Don't think of the shell as an exceptional tool that you should only use when other things fail. To develop fluency in the system you've chosen to learn, reach for shell commands first.

[–] jsveiga@sh.itjust.works 7 points 1 year ago

Linux has a graphical file manager? How bizarre.

[–] monosnake@lemm.ee 7 points 1 year ago (1 children)

Some gui have more benefits that others, even some terminal commands are better to use than others, not really a Linux issue.

Sidenite, what's this tool called that can convert the jpgs?

[–] Tippon@lemmy.dbzer0.com 3 points 1 year ago

It's the rather snappily named cbz_jpg-to-webp by azuravian and the Github page is here:

https://github.com/azuravian/cbz_jpg-to-webp

I haven't used it at all yet, so I have no idea how well it works. As usual, test it out on a copy of your files first :)

[–] blkpws@lemmy.ml 6 points 1 year ago* (last edited 1 year ago)

Well I think Linux way is better, the windows search bar has no info, while file has file --help and man file to help you to use it and customize your search, making it easier to find your files with any filter or extra action you want. As other people says here on comments, it works different, you are used to GUI and you need to re-learn the OS basics for Linux. As anyone used only Linux would need to do to use Windows too (and I know people that never used a Windows and says it is too difficult and a bit stupid how it works).

[–] saigot@lemmy.ca 5 points 1 year ago (1 children)

So let's imagine in a weeks time you have a slightly different issue, you need to do the same operations, but only up to 3 subdirectories deep.

On windows you'd be back to square one. on linux you just add -maxdepth 3 to the command you found and congrats it's done.

You have learnt a permanent skill now.

[–] Tippon@lemmy.dbzer0.com 4 points 1 year ago (1 children)

I like your optimism :)

I haven't learned a new skill, I just copied and pasted some commands from a website. As it is, I've been using Xubuntu on this server for a few years, and Mint on my laptop (on my PC now and then too, and permanently once I can get rid of Adobe), and I'm comfortable with the terminal. I grew up using DOS, and could set up gaming boot disks in my sleep. I just think it's silly that to do something as basic as copying files, I had to resort to this. Someone new to Linux coming from Windows is not going to have a clue how to do it, and is likely to go back, all over one of the most basic operations a GUI should be able to do.

[–] saigot@lemmy.ca 2 points 1 year ago (1 children)

Someone new to Linux coming from Windows is not going to have a clue how to do it, and is likely to go back, all over one of the most basic operations a GUI should be able to do.

If they don't want to learn the basics perhaps they should?

[–] Tippon@lemmy.dbzer0.com 1 points 1 year ago

The basics doesn't involve having to drop into the terminal because the file manager can't do basic file operations. You'd probably complain about Windows making you switch between Settings and Control Panel because it's bad design, but because this happened in Linux, it's fine.

[–] rjh@beehaw.org 5 points 1 year ago* (last edited 1 year ago)

If you keep trying to use GUI to do what you want you're gonna have a bad time. The majority of Linux users doing power stuff like this will use the terminal. Because of that, the GUI is unfortunately underdeveloped.

It's good once you learn it though. Let's say that tool never existed. I could easily write a bash script to compress images in cbr or cbz myself. Or autoconvert all cbr files to cbz. Or watch my downloads directory for new files and do that automatically. It's very flexible and empowering if you learn it. Nobody can make a GUI for every single thing people want a script for.

[–] deong@lemmy.world 4 points 1 year ago (1 children)

So your solution on Windows requires me to move all my files out of where they belong to process them? How do I get them all back when I’m done?

I knew how to write that find command. Didn’t need to search for anything. And because I know how to do that, I can also search for every pdf file modified since last month. I can spit out a list of the gps coordinates for every photo I’ve taken, ordered by latitude. I can find every Python script on my computer that uses Pandas. I can do a million things that boil down to "find every file that matches some complex filter and do something to it", and I learned one tool. I don’t need to learn one point and click app that converts comics, one that messes with photo metadata, etc.

I can sympathize with the idea that there’s a high learning curve. And there’s nothing wrong with trying to provide ways for people to use their computer that require less knowledge. But recognize that you’re asking for a crutch here.

[–] iamdanno@lemmy.zip 2 points 1 year ago (1 children)

I agree with a lot of what you say, but when you are handicapped (by lack of knowledge), it's ok to ask for a crutch. Maybe you only need it temporarily, but it's a massive help while you need it.

I've tried switching to Linux several times, but there seems to be a lot of gatekeepers who just say (essentially), "you're doing it wrong!".

I just want my computer to do what I want, without needing to use up hours trying to figure out some quasi-coding terminal command. Maybe I'm not the intended user, or something.

[–] deong@lemmy.world 2 points 1 year ago

I agree with you. There's nothing wrong with not knowing how to do something. We all start basically every endeavor not knowing how to do it. My complaint is specifically with people who march into that thing they haven't learned yet with an attitude of "and you're all wrong and stupid for not fixing it for me".

[–] Lucia@eviltoast.org 4 points 1 year ago (1 children)

Since xfce 4.18 Thunar can search files w/o catfish perfectly fine btw. Do Xubuntu still uses the previous version?

[–] Tippon@lemmy.dbzer0.com 2 points 1 year ago (1 children)

Thunar is currently on 4.16.10. I just checked for updates, and Thunar isn't in the list. It may be part of one of the other packages that are available, but I haven't had a chance to check properly yet.

It's good to know that Catfish is being phased out though, I'm not a fan of it.

[–] Lucia@eviltoast.org 3 points 1 year ago

I assumed Xubuntu to have the latest xfce version since Linux Mint updated their not so long ago, but it seems they did it on their own.

4.18 is a really good update for xfce and especially Thunar - search for files in subdirectories is as simple as to press ctrl+F and start typing. I really hope Xubuntu will get it soon.

[–] llii@feddit.de 3 points 1 year ago

Your title is a bit provocative but I feel you. The biggest plus for Linux is also a bit of a negative: there are so many different ways to do things. There are multiple file managers for example, that all behave differently in some ways. So at the beginning it can be frustrating at times to figure out how things work and how to accomplish your goal.

[–] xilliah@beehaw.org 2 points 1 year ago (2 children)

It was anxiety inducing to read your post as I thought you'd accidentally end up deleting your entire collection!

load more comments (2 replies)
load more comments
view more: next ›