The Linux Thread - The Autist's OS of Choice

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
*El Snippeth*.
I don't doubt Discord's garbageness. Luckily, I already use OBS (Even used SLOBS for a brief period), but only one instance. Usually, I would stream to Discord so the voice chat can watch in real-time, while using OBS to stream to Twitch, which gets the 3-5sec delay.

I can't help by wonder if it's feasible to run multiple instances of OBS for the same purposes.
 
I don't doubt Discord's garbageness. Luckily, I already use OBS (Even used SLOBS for a brief period), but only one instance. Usually, I would stream to Discord so the voice chat can watch in real-time, while using OBS to stream to Twitch, which gets the 3-5sec delay.

I can't help by wonder if it's feasible to run multiple instances of OBS for the same purposes.
What is the point of the "*snip*" thing you can some others will do when the entire post is still small enough to be quoted?
 
  • Like
Reactions: Bagger 293
I don't doubt Discord's garbageness. Luckily, I already use OBS (Even used SLOBS for a brief period), but only one instance. Usually, I would stream to Discord so the voice chat can watch in real-time, while using OBS to stream to Twitch, which gets the 3-5sec delay.

I can't help by wonder if it's feasible to run multiple instances of OBS for the same purposes.
WAT? Why would you need multiple instances of OBS? Just use the RTMP plugin... check for it on your package manager, it's probs listed in extras.

What is the point of the "*snip*" thing you can some others will do when the entire post is still small enough to be quoted?
I was breaking down their last two post into autistic hand holding sentence by sentence. So I just walked it back to nothing with a simply reply on my end with info where to look so I wouldn't sped again. IDK why they're doing it.
 
  • Like
Reactions: Bagger 293 and Vecr
I have several files with dates at the end of their filenames. How do I bulk rename them so the date gets sent to the beginning of the filename instead?

I can't code for shit, can't find anything that works on duck and I'm failing to extract working bullshit from LLMs
 
I have several files with dates at the end of their filenames. How do I bulk rename them so the date gets sent to the beginning of the filename instead?

I can't code for shit, can't find anything that works on duck and I'm failing to extract working bullshit from LLMs
Need to be slightly more specific, as the exact method will differ depending on the format of the date, but generally.

touch foo.2021-01-07

for i in foo* ; do echo mv -n "$i" $(echo "$i" | sed 's/\(.*\)\.\(20..-..-..\)$/\2-\1/' ) ; done

outputs: mv -n foo.2021-01-07 2021-01-07-foo

Once you're sure it's going to work you can remove the "echo" and let it run the mv
The -n makes sure it doesn't overwrite a file if you hose it up

If the filenames have spaces or special characters it will suck more.
 
  • Like
Reactions: Marvin and Jang Joo
Need to be slightly more specific, as the exact method will differ depending on the format of the date, but generally.

touch foo.2021-01-07

for i in foo* ; do echo mv -n "$i" $(echo "$i" | sed 's/\(.*\)\.\(20..-..-..\)$/\2-\1/' ) ; done

outputs: mv -n foo.2021-01-07 2021-01-07-foo

Once you're sure it's going to work you can remove the "echo" and let it run the mv
The -n makes sure it doesn't overwrite a file if you hose it up

If the filenames have spaces or special characters it will suck more.
I appreciate your input. To be honest I didn't fully get it, and at the same time I started thinking about my problem more in terms of "text go from here to there" instead of specifically dates. That also helped me go off again, hitting my head until I stumbled upon perl-rename.

So ultimately what I did was this one-liner inside a few folders:

$ perl-rename 's/^(.*?)(-?)(.{15})(\.eml)$/$3 $2$1$4/' -- *

It's perl's rename, as opposed to just "rename" which is from util-linux (figuring that out was also fun).
15 encompasses the date format
.eml is the type of file I'm working with
Note the space after $3, so that the date isn't glued to the following text, like 2023foo.
I also had to add -- before *, if it was just * it'd error out as if I were trying to use an option that doesn't exist.
 
Last edited:
I also had to add -- before *, if it was just * he'd error out as if I were trying to use an option that doesn't exist.
As you've now implicitly learned, the shell expands * before passing it to the command, so if a file is named -foo then the perl-rename(or grep, or whatever) will just see -foo and think it's an option. Most commands accept -- as you found to end option processing. Another alternative is to use ./* so that expands to ./-foo which won't look like an option.
 
I appreciate your input. To be honest I didn't fully get it, and at the same time I started thinking about my problem more in terms of "text go from here to there" instead of specifically dates. That also helped me go off again, hitting my head until I stumbled upon perl-rename.

So ultimately what I did was this one-liner inside a few folders:

$ perl-rename 's/^(.*?)(-?)(.{15})(\.eml)$/$3 $2$1$4/' -- *

It's perl's rename, as opposed to just "rename" which is from util-linux (figuring that out was also fun).
15 encompasses the date format
.eml is the type of file I'm working with
Note the space after $3, so that the date isn't glued to the following text, like 2023foo.
I also had to add -- before *, if it was just * it'd error out as if I were trying to use an option that doesn't exist.
perl-rename is indeed the answer.

It's not so much "perl's rename" as the version of rename written in Perl. The actual upstream program is just called "rename", but some distros forcibly change its name to perl-rename to stop the collision with the other rename. It's a classic Linux mess.
 
  • Like
Reactions: Marvin
perl-rename is indeed the answer.

It's not so much "perl's rename" as the version of rename written in Perl. The actual upstream program is just called "rename", but some distros forcibly change its name to perl-rename to stop the collision with the other rename. It's a classic Linux mess.

I think I recall someone here, maybe it was AmpleApricots, who expressed that Perl is utter shit, to the point BSDs actively avoid including Perl. I'm willing to hear experts out on this.
 
I think I recall someone here, maybe it was AmpleApricots, who expressed that Perl is utter shit, to the point BSDs actively avoid including Perl. I'm willing to hear experts out on this.
Perl is still the best language out there. I just have to write Python these days since that's what I get paid for. And Python's native package management is slightly better.

Writing "perl-rename" in Python should take about 10 minutes if your system doesn't have perl.
 
I think I recall someone here, maybe it was AmpleApricots, who expressed that Perl is utter shit, to the point BSDs actively avoid including Perl. I'm willing to hear experts out on this.
Even when I semi-knew coding (to a laughably bad extent) perl always just looked like line noise to me.
 
How do I bulk rename them so the date gets sent to the beginning of the filename instead?
Jesus Cornelius Christ I feel sorry for you trying to find a solution to what should just be a base-system Linux tool with even one or two GUI frontends to pick from. In fact every DE file manager worth a shit should have a multiple-file rename option built in. I went down that road myself and just started banging my head when the only answers looked like this:
for i in foo* ; do echo mv -n "$i" $(echo "$i" | sed 's/\(.*\)\.\(20..-..-..\)$/\2-\1/' ) ; done
And this:
$ perl-rename 's/^(.*?)(-?)(.{15})(\.eml)$/$3 $2$1$4/' -- *

The only solution I have come up with so far is using an WinXP VM with a freeware program I picked up 20 years ago. I move the files I want to rename into the "shared" folder, run the program (which has every option I can think of) and rename the files and then move them back. It's an extra couple of steps but it works.

I had a similarly frustrating issue in the past trying to batch zip multiple files in Linux. In this case it was a collection of Sega Genesis ROMs in the .bin format that I wanted to to turn into .zip files. I read through all the MAN pages and tried every archive GUI I could find and all I could still do was either zip them individually by hand or zip them all into one big lump.

(power level ahead: showing my age) Finally I got sick of it and just wrote a QBASIC program in 5 minutes. *All file names below have been changed to be funnier*
1 $ ls >nigger.txt
2 [move nigger.txt to DOSBox folder]
3 DOSBox -> QBASIC /RUN ZIPPER.BAS
4 zipper.bas reads the directory list and outputs a Linux shell script, faggot.sh, writing a separate zip command for every file
5 [move faggot.sh back to Linux folder]
6 $ sh faggot.sh
7 ???
8 Profit! Success!

Like my multiple-file rename solution it may add extra steps but it just fucking works. RMS probably wouldn't approve for obvious reasons but I've been using these workarounds for years now. If anybody has anything better I am more than happy to hear it.
 
Really?
for i in *.bin ; do zip `basename $i .bin`.zip $i ; done

I swear, some people should just stick to Windows.
I swear, unhelpful people should just fuck off.

Your "answer" explains nothing. That is the gayest way to say what should be something simple like "zip -[niggerfaggotbatchoption] *.bin".

I suppose if you meet a foreigner you yell at them to "speak American!" too. Because they should just know your syntax.
 
I think I recall someone here, maybe it was AmpleApricots, who expressed that Perl is utter shit, to the point BSDs actively avoid including Perl. I'm willing to hear experts out on this.
Perl isn't shit. It stagnated because Larry Wall was obsessing over with doing a rewrite in the form of Perl 6, which nobody but him was interested in. That's the main reason it got eclipsed by Python, which fulfils more or less the same role.
 
I swear, unhelpful people should just fuck off.

Your "answer" explains nothing. That is the gayest way to say what should be something simple like "zip -[niggerfaggotbatchoption] *.bin".

I suppose if you meet a foreigner you yell at them to "speak American!" too. Because they should just know your syntax.

My shell knowledge is a bit rusty, but if you know any programming it broadly makes sense, just with weird Bourne shell syntax.

for i in *.bin ; do zip `basename $i .bin`.zip $i ; done

This is basic shell commands. The for i in *.bin is a loop (or iterator). It will go through all the files that match *.bin and run zip basename $i .bin`.zip $I The $i is how you reference a shell variable (in this case the I from the for loop which is the current file). The zip stuff, zips the file. to end a shell loop you need to use done.
 
I suppose if you meet a foreigner you yell at them to "speak American!" too. Because they should just know your syntax.
If you have the time and ability to write your qbasic code to generate a shell file command for every file, you should be able to recognise a simple for loop. Your problem is that you don't want to learn, you just want to be told what to copy and paste to make it work, like some useless pajeet on stackoverflow.
 
Discord just runs like absolute hot garbage. You're almost better off running it in a browser if you want to use it since it's basically built like a web app and uses Web RTC anyways.
I've found the armcord alternative client to be a lot better for this, it's still electron garbage but it's less garbage than regular discord.
 
The only solution I have come up with so far is using an WinXP VM with a freeware program I picked up 20 years ago. I move the files I want to rename into the "shared" folder, run the program (which has every option I can think of) and rename the files and then move them back. It's an extra couple of steps but it works
Are you talking about ReNamer? Yeah it is a very power tool that even has the ability to do things like break apart the file name into multiple strings then rearrange them. I looked through the Linux Mint repository for a file ReNamer Gui, and while there were a few they were all very basic and none had this feature.
 
  • Informative
Reactions: Jang Joo
If you have the time and ability to write your qbasic code to generate a shell file command for every file, you should be able to recognise a simple for loop. Your problem is that you don't want to learn, you just want to be told what to copy and paste to make it work, like some useless pajeet on stackoverflow.
This is how you cut and paste something from ChatGPT and end up resetting your root password to "PwnMe" and enabling your router for inbound ssh.

I know there's at least one joke repo on github that if you curl REPOURL | sudo bash it will delete sudo, curl and bash off your system.
 
Back