Linux - Reddit – Telegram
Linux - Reddit
752 subscribers
4.17K photos
207 videos
39.8K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
How Linux made me BEST Intern in just 30 min. I LOVE LINUX <3

While my other friends are busy with learning javanoscript I spend my summer learning about bash and old school unix programs like awk, sed, cut, paste, grep, regex, etc. and during my internship I realized how awesome these programs are I automated all my internship work with bash using these tools, I earn lot of money by doing nothing. I even made a youtube channel where I show people how these small programs can make you a computer wizard.

Enough talk now let me show you an example of this -

BTW I also have a detailed Video explaination on this too.

So one day my boss gave me a very urgent task.

Task \- Find 300 short stories.

Conditions -

Stories should be Non Copyrighted. Means - I cannot pick stories from random website.
Remove all expletive words from Story's text.
Create google doc files for all 300 stories
Doc file noscript must be same as story noscript.
Do all of this in just 30 min (WTF?)

Note : Even my boss was aware this is almost impossible to do this in just 30 min. So he was just asking politely - Can you do this?

AND since he had lot of deadline stress. I said YES. Because I got an idea.

>Then I played mr robot [main theme music](
https://www.youtube.com/watch?v=XMEXPkPmmq0) and open Terminal \HACKERMAN* (sorry)

&#x200B;

First I need to get Non Copyrighted stories.

I can use reddit for this ( r/ShortyStories , r/shortstories, r/sadstories ). I can get stories from here.

So If you add `.json` in the end of any reddit url and you will get json output instead of webpage.

curl -s -H "User-agent: 'your bot 0.1'" \
https://www.reddit.com/r/ShortyStories/top.json\?t\=all\&limit\=300 > story.json

With this simple curl magic I got a `story.json` file which contain 300 posts.

Now with a simple python noscript -

$ cat
magic.py
import json
with open('story.json') as f:
lol = json.load(f)
for x in lol['data']['children']:
print("# " + x['data']['noscript'])
print(x['data']['selftext'])

$ python
magic.py > stories.txt

I fetched all noscripts & stories text from my json file. Notice I used `#` Before printing noscript.

Now with these 3 simple commands I remove all useless text written between brackets [\], useless urls and expletive words (I downloaded a badwords.txt from github which contain huge list of expletive words.

&#8203;

sed 's/[.]//g' story.txt
sed -i -e 's!http[s]\?://\S
!!g' story.txt
while read word ; do sed -i "s/\s$word\s//gi" ; done < badwords.txt

Then I use simple awk magic to split all stories into different markdown files -

&#8203;

awk -v n=100 '/^#/{n++}{print > n ".md"}' story.txt

Imagine doing this without awk! So this way I created 300 markdown files and each file contain -

# Title of story
And then some text of story

and My file names were like ->
101.md 102.md 103.md 104.md .... 400.md

Then I used pandoc to convert my markdown files into docx files

&#8203;

for f in .md ; do pandoc -s -o $f.docx $f ; done

Now I created a list of noscripts and then sanitize my noscripts to remove spaces and some special characters -

&#8203;

grep -E "^#" story.txt > noscripts.txt
sed -i -e 's/^A-Za-z0-9 //g' noscripts.txt
sed -i 's/ /-/g' noscripts.txt

Then I wrote this simple bash noscript to rename my files -

&#8203;

#!/bin/bash

i=101 # first file name is
101.md
while read noscript;
do
mv $i.md.docx $noscript.docx
((i=i+1))
done<noscript.txt

At last I move these .docx files into a stories directory and upload this directory on my google drive. Make a shareable link of the folder and send it to my boss.

OMG I Love Linux. Can you do this one Windows? My boss was very happy and he declared me best intern which means BONUS .. MONEY MONEY MONEY!

So Go on learn to use terminal and try to apply it in your daily life problems. because -

>Knowing is not enough, you must apply
>
>willing is not
Overview Linux Distros,Desktops (Everybody can help)

Hi I want to create a clear overview of the most relevant distributions + desktops especially for beginners to make their change to the right operating system as easy as possible. But of course i need your help to create a brilliant overview for anyone.
After finishing i will upload it in r/linux

In the following i will show you my thoughts how i would structure it. There is NO specific order just an overview of my thoughts (any advices,additions are welcome)
‼️Reminder only the most relevant (no gentoo,...)‼️


💽Distributions💽

1. Experience with Linux:
Beginner | Advanced | Pro

2. Base (head) Distros:
Debian | SLS | Arch

3. Main Distros:
Ubuntu | Red Hat Linux | Debian | Arch

4. Derivatives:
-Ubuntu
Elementary os | Linux Mint | Zorin os
-Red Hat Linux
Fedora | Cent os
-Arch
Manjaro


🖥️Desktop Environments🖥️

1. Resource consumption:
Low | Medium | High

2.Desktops:
KDE Plasma | Gnome | XFCE | Deepin | Cinnamon

https://redd.it/ldsoeq
@r_linux
Adobe Lightroom alternatives

Hello, I've been trying to move away from Windows into Linux and I now find myself in a pickle, are there any good lightroom like software available? mostly something with similar editing dynamic/ core features.

Ideally something that runs on both Debian and Arch-based distros, but just Debian is ok since I'm probably gonna move to Pop_OS due to its really good graphics support...and because I use Davinci Resolve.

https://redd.it/le6xho
@r_linux
What is happening when I press the number keypad with numlock on and random characters show up in my terminal as input?

It's happened before with Cisco IOS terminal access as well. Is it random characters from memory then? No need to ELI5, I'm learning assembly on ARM currently and the thought occured to me that it might have something to do with what's currently stored in the register that would've been used to input a number if the numlock was off.

Googling it only came up with people asking for help due to malfunctioning keyboards.

https://redd.it/le8tqc
@r_linux
What sort of things should a Linux beginner start learning?

I'm a noob to Linux. Okay not a complete noob like I know how to install stuff how to use terminal, root, SSH that kinda stuff but I feel like I can do so much more with Linux.


What kinda stuff should I start learning?

https://redd.it/le9sdr
@r_linux
Is there a self-hosted File Server program that's accessible via iOS?

I want to set up a simple dropbox type file server for my girlfriend to store her photos. She just got an iPhone for the nice camera, and now I'm stuck figuring out how to host a file server that can be intuitively accessed via her iPhone. Whether it's by the share function or an iPhone app, doesn't really matter much. As long as it's free and she can easily save, browse, and download files on our home PC over the internet.

https://redd.it/leddjc
@r_linux
Made a noscript to auto unzip files in your downloads folder

My job requires me to download a TON of zip files. Its a very simple noscript, but I recently lost it on a machine and really felt the difference. So I recreated it and figured I'd share with yall.

&#x200B;

Some notes, I have it run 6 times on a 10 delay, this is because cron doesnt get anymore precise than a minute, so this allows the functionality to happen every 10 seconds. If there are multiple files in the zip, it creates a directory, otherwise if only 1 file if will just directly unzip. It also deletes the zip, which you can remove if its too intrusive.

&#x200B;

cd home/falcon/Downloads

i=0
while $i -lt 6 ; do
echo "On pass $i of 6"
for file in ./.zip; do
[ -f "$file" ] || continue
lines=$(zipinfo -1 "$file" | grep -v "/." | wc -l)
if [ $lines -gt 1 ]
then
echo "Found multiple files, creating directory"
formattedName="${file%.
}"
mkdir "$formattedName"
unzip -fo "$file" -d "$formattedName/"
else
echo "Found only 1 file"
unzip -fo "$file"
fi
rm "$file"
done
sleep 10
i=$(( i + 1 ))
done

&#x200B;

https://redd.it/legm9g
@r_linux
How do i make a widget?

I want to make a widget on the ubuntu status bar. It will have some real-time updated text & if i click it, i can have menu with icons and maybe submenus with more stuff. I want to automate some of my work without having to run many terminals. All it in one.

Anyone know what example/library/code i should get and then modify to do what i want?

https://preview.redd.it/9cn35lubq0g61.png?width=127&format=png&auto=webp&s=77ac6cc4284c55f58bc9fd8227ba6fe5c6590f67

https://redd.it/leixvm
@r_linux
Can I live boot linux from a partion and mount same hard disk (using a mac)

I have a 2015 mac and a 1tb hard drive. can I partition the hard disk for live booting kali and/or windows both, and mount the rest on both. I am learning reverse engineering and ghidra etc isn't working on a virtual machine.

https://redd.it/lejn5p
@r_linux
Recommend me DE or Window Manager

Hello, folks! I'm looking for new Desktop Environment or a Window manager, currently I'm using i3wm with polybar, however there are plenty of small bugs that bother me. When someone is calling me on slack/Skype I don't see the dialog box to answer unless I have the application opened on my screen, having dialog boxes from IDE's like Pycharm, IntelliJ and so on is pain in the ass. I'm a programmer / systems administrator and have tons of terminals open And IDE's, I don't want to spend time debugging my own machine. Most of the features from i3 that I use are: toggle full screen, having split screen, moving apps to different deaktop (page whatever is called), resizing windows, having specific apps to open to specific desktop also using single 4k monitor.

https://redd.it/lek2b5
@r_linux
VServer Problem to use Virtual Machine + Docker

Because Hostsystem is a rent virtual Server Ubuntu 18.04 we want to run similar virtual Machines as guest systems in this VServer but we dont have Access to Install Kernel Modules so we cant Run virtual Box etc. How could we get it?
we can Run Docker-

https://redd.it/leje5z
@r_linux
Linux+ Exam

Start off by saying good morning. I wanted to reach out to the all knowing Reddit for some assistance. I’ve been in IT for 16 years and I’ve I finished my IT degree. I will just be working on certs from now on. I’ll be taking my Linux+ Exam at the end of the month and wanted to check and see if anyone out here had a decent study guide to go off of of. The Comptia book leaves me wanting more.

BL

I’m looking for a study guide or a location to get one

https://redd.it/lenbr0
@r_linux
Find IP on it's own

Hi. Is there anyone is this group that can help me.

I have next question:

I have a Ubuntu machine I want this machine to get an adress on the network. BUT if it is not in a DHCP network, that it tries to get an IP adress on its own.

For example by scanning its interface on the ip addresses that pass by and then try to find create one of its own and then find the gateway outside.

Does anyone have any idea how to create this with what tools?

https://redd.it/leniq1
@r_linux
Where should you install frameworks ?

So I'm currently installing a framework named kafka on my personal computer just for personal use. (Not in production)

And the question just hit me, where should I put this ? Usually I just put in in my personnal user folder add the bin path to the PATH global variable and that's it.

Honestly I find it weird, I don't want to have such folders in my personal folder, but I couldn't figure where I should put it ?

The most logical place would be the opt folder but I want to take a second guess and ask it here.

https://redd.it/lepzzg
@r_linux
In Console 39 we got a look into what the process for maintaining various Unix ports is like by interviewing a long-time maintainer of the doas port. I thought /r/Linux might be interested :)
https://console.substack.com/p/console-39?r=3cbez&utm_campaign=post&utm_medium=web&utm_source=linux_subreddit

https://redd.it/lepchx
@r_linux
Installing Pop!_OS on a legacy HP laptop


I have an old HP HDX18t ddr2 that I’m refurbishing and I wanted to put a Linux distro on the new drive I’m installing. The laptop has two drive bays which is really neat and I wanted to put Pop! On one of them but was unsure if I’d run into compatibility issues. Does anyone know if Pop! Will run on a legacy system from 2009?

https://redd.it/leuldq
@r_linux
Polling CPU temperature for RAPL framework.

Hi. I got a Xeon 8260M cpu with a slightly insufficient cooler, that is, the cpu temperature slowly ramps up until it reaches >90C.The good thing is that it takes more than 10 minutes under full load to reach such temp.

If I power-cap it using the RAPL framework, taking off some \~20W from its TDP, the temperature gets quickly under control, at the expense of some 300-400 MHz.

So, here is what I want to do: I want to poll the cpu temperaure every (say) 10 seconds. If it's above some threshold, issue the appropriate RAPL command. As it gets under some other threshold, issue another RAPL command to make the CPU regain its full TDP.

My question is: how can I poll the temp from inside a shell noscript and/or python program?

https://redd.it/levt40
@r_linux
Best Tool for Multiboot USB with Persistence?

Best Tool for Multiboot USB with Persistence?

What is the best utility/software for making a Multi-Boot USB with mutliple linux peristence systems?

Basicly what is the easyiest best and safest to make mutiple persistence ISO's?

Easy2boot, YUMI, or Ventoy?

Would like to hear some opinions.


>(I have used Easy2Boot already)

https://redd.it/lex3v5
@r_linux