How I (stupidly) lost my data from the last 8 months
Just thought I would share my experience of how I fucked up, it's possible someone else might have the same train of thought as I did.
I was actually in the process of making backups when this happened. I had the computer with the main source of data syncing a new backup to another computer (about 3% done at the time), while also actively in the process of copying a backup to an external hard drive.
The external hard drive did not have enough space for the new backup, so I decided to delete the previous backup to make space (the penultimate disaster yes, but not the final). As with any file manager when you delete something it gets sent to the trash/recycle bin/rubbish/whatever. After "emptying the trash" I noticed that it was going slower than I anticipated. Knowing that I can speed up the process by stopping and eliciting the tried-and-true `rm -rf X` command, I stopped the deleting process.
With my brain working in autopilot, I right-click inside the "Trash" folder and use the convenient "Open Tilix Here" entry to open a new terminal inside the "Trash folder" so I can `rm` these files faster. However - as I realized some moments later - the "Trash" is not a real folder that exists in storage. Instead, Tilix had dropped me into the main user directory, which contained the principal folder being backed up - which had the same name as the one I was deleting from the external hard drive.
The result clearly being the most recent data deleted. The moment in between the removal finishing and my realizing, I saw the folder (most recent backup) was still on the external drive and deleted it thinking I had missed something.
Luckily I still had an older backup elsewhere from January, so not a total loss...
Learn from my mistake, **if your file manager or terminal allows you to open in a terminal inside the "Trash", don't do it.**
https://redd.it/ck29s3
@r_linux
Just thought I would share my experience of how I fucked up, it's possible someone else might have the same train of thought as I did.
I was actually in the process of making backups when this happened. I had the computer with the main source of data syncing a new backup to another computer (about 3% done at the time), while also actively in the process of copying a backup to an external hard drive.
The external hard drive did not have enough space for the new backup, so I decided to delete the previous backup to make space (the penultimate disaster yes, but not the final). As with any file manager when you delete something it gets sent to the trash/recycle bin/rubbish/whatever. After "emptying the trash" I noticed that it was going slower than I anticipated. Knowing that I can speed up the process by stopping and eliciting the tried-and-true `rm -rf X` command, I stopped the deleting process.
With my brain working in autopilot, I right-click inside the "Trash" folder and use the convenient "Open Tilix Here" entry to open a new terminal inside the "Trash folder" so I can `rm` these files faster. However - as I realized some moments later - the "Trash" is not a real folder that exists in storage. Instead, Tilix had dropped me into the main user directory, which contained the principal folder being backed up - which had the same name as the one I was deleting from the external hard drive.
The result clearly being the most recent data deleted. The moment in between the removal finishing and my realizing, I saw the folder (most recent backup) was still on the external drive and deleted it thinking I had missed something.
Luckily I still had an older backup elsewhere from January, so not a total loss...
Learn from my mistake, **if your file manager or terminal allows you to open in a terminal inside the "Trash", don't do it.**
https://redd.it/ck29s3
@r_linux
reddit
r/linux - How I (stupidly) lost my data from the last 8 months
0 votes and 1 comment so far on Reddit
Weekly Questions and Hardware Thread - July 31, 2019
Welcome to r/linux! If you're new to Linux or trying to get started this thread is for you. Get help here or as always, check out r/linuxquestions or r/linux4noobs
This megathread is for all your question needs. As we don't allow questions on r/linux outside of this megathread, please consider using r/linuxquestions or r/linux4noobs for the best solution to your problem.
Ask your hardware requests here too or try r/linuxhardware!
https://redd.it/ck390h
@r_linux
Welcome to r/linux! If you're new to Linux or trying to get started this thread is for you. Get help here or as always, check out r/linuxquestions or r/linux4noobs
This megathread is for all your question needs. As we don't allow questions on r/linux outside of this megathread, please consider using r/linuxquestions or r/linux4noobs for the best solution to your problem.
Ask your hardware requests here too or try r/linuxhardware!
https://redd.it/ck390h
@r_linux
reddit
r/linux - Weekly Questions and Hardware Thread - July 31, 2019
0 votes and 0 comments so far on Reddit
Penguin Origin
What is the origin of a penguin as the logo for Linux? (I don't use Linux, I simply like penguins.)
https://redd.it/ck0x1j
@r_linux
What is the origin of a penguin as the logo for Linux? (I don't use Linux, I simply like penguins.)
https://redd.it/ck0x1j
@r_linux
reddit
r/linux - Penguin Origin
0 votes and 4 comments so far on Reddit
Well, I finally did it...
Moved to UbuntuMATE after a year with Windows 10 on my main rig.
Yea, I know not every game will work with my OS.
But it beats feeling like I don't own my own computer.
I have used every Windows since 95, and 10 is by far, the worst.
https://redd.it/ck43w0
@r_linux
Moved to UbuntuMATE after a year with Windows 10 on my main rig.
Yea, I know not every game will work with my OS.
But it beats feeling like I don't own my own computer.
I have used every Windows since 95, and 10 is by far, the worst.
https://redd.it/ck43w0
@r_linux
reddit
r/linux - Well, I finally did it...
0 votes and 0 comments so far on Reddit
Countries crying out for Linux Sysadmins?
I'm a junior Linux enthusiast, trained up sysadmin but it's so hard to get into the industry in the UK. I've worked as an IT Tech, web dev etc. What are the main countries desperately looking for Sysadmins?
https://redd.it/ck6555
@r_linux
I'm a junior Linux enthusiast, trained up sysadmin but it's so hard to get into the industry in the UK. I've worked as an IT Tech, web dev etc. What are the main countries desperately looking for Sysadmins?
https://redd.it/ck6555
@r_linux
reddit
r/linux - Countries crying out for Linux Sysadmins?
0 votes and 6 comments so far on Reddit
Linux server administration tools
What tools are you using to manage linux servers.
I have a scenario where I am given 200 + servers. How would you manage those.
Also, i would like to lockdown ssh,telnet,ftp in all the servers except master which I am using and all the changes to slaves should be done through master.
I prefer open source and dont mind with paid ones too
Thanks 🙏 in advance
https://redd.it/ck6q9z
@r_linux
What tools are you using to manage linux servers.
I have a scenario where I am given 200 + servers. How would you manage those.
Also, i would like to lockdown ssh,telnet,ftp in all the servers except master which I am using and all the changes to slaves should be done through master.
I prefer open source and dont mind with paid ones too
Thanks 🙏 in advance
https://redd.it/ck6q9z
@r_linux
reddit
r/linux - Linux server administration tools
0 votes and 3 comments so far on Reddit
Valve proposes kernel changes to help gaming performance
https://lkml.org/lkml/2019/7/30/1399
https://redd.it/ck77gm
@r_linux
https://lkml.org/lkml/2019/7/30/1399
https://redd.it/ck77gm
@r_linux
reddit
r/linux - Valve proposes kernel changes to help gaming performance
0 votes and 9 comments so far on Reddit
Chrome now prevents websites from checking private browsing mode
http://www.viralbor.com/2019/07/chrome-now-prevents-websites-from.html
https://redd.it/ck7n86
@r_linux
http://www.viralbor.com/2019/07/chrome-now-prevents-websites-from.html
https://redd.it/ck7n86
@r_linux
Viralbor
Chrome now prevents websites from checking private browsing mode
As promised, Google is willing to make websites respect the incognito mode whether they like it or not. Chrome (76) released Linux, Windows
PGP encrypt file without showing password in plaintext
This is more a question of concept than a way to do it. Here's the scenario, which I believe is fairly common:
I have a bunch of personal text files I want to backup to an online storage. I want to archive these together into archives before I send them and password protect the archive.
One of the straight forward solutions I've found is to use PGP: $pgp -c \[myfile\] will do nicely, and I can do that to tar archives. OK, so far so good. This asks for a password, and I can create a long complicated password. My issue happens when I want to automate this using a cron job.
Say I want to cron this every day at 1am. The scrip will run and ask me to create a password, only thing is I will be deep asleep in my bed. There's probably a way to specify a password in the pgp command itself, but that's dumb: anyone who has access to the noscript will have access to the password in plaintext.
So! this is a pretty basic concept in linux (I think), but I'm missing something. How do you password protect this? Again, the idea is that these files need to be protected before I upload to an online service. What would you guys do?
https://redd.it/ck6naq
@r_linux
This is more a question of concept than a way to do it. Here's the scenario, which I believe is fairly common:
I have a bunch of personal text files I want to backup to an online storage. I want to archive these together into archives before I send them and password protect the archive.
One of the straight forward solutions I've found is to use PGP: $pgp -c \[myfile\] will do nicely, and I can do that to tar archives. OK, so far so good. This asks for a password, and I can create a long complicated password. My issue happens when I want to automate this using a cron job.
Say I want to cron this every day at 1am. The scrip will run and ask me to create a password, only thing is I will be deep asleep in my bed. There's probably a way to specify a password in the pgp command itself, but that's dumb: anyone who has access to the noscript will have access to the password in plaintext.
So! this is a pretty basic concept in linux (I think), but I'm missing something. How do you password protect this? Again, the idea is that these files need to be protected before I upload to an online service. What would you guys do?
https://redd.it/ck6naq
@r_linux
reddit
r/linux - PGP encrypt file without showing password in plaintext
2 votes and 12 comments so far on Reddit
How I almost nuked my entire /home directory with 'find'
So... I was using the `find` command to look for some files and directories that I wanted to remove. I entered `find . -iname '*somestring*'` to see what would be removed. Then I started typing `find . -delete -ina` and at this time I stopped and thought to myself "Nah, -delete should go at the end." I thought the logic is "find where, what, do what/action."
I didn't think it mattered, it was just the way I often condition myself to do things right. Because while in Linux you have freedom to do a thing in one of 6783 ways, most ways are wrong, for what you are trying to achieve. It may work but it may be the wrong approach for your specific situation. Or it works, but only for 95% of scenarios... and one day, you'll hit that 5%. And I think that if you do things wrong out of laziness and just tell yourself "I know this is wrong, but I'm just lazy now because it doesn't matter" then this will leak in other tasks, where it WILL matter.
So I finally enter `find . -iname '*somestring*' -delete`
I later find out that `find . -delete -iname '*somestring*'` will delete everything in your current directory (subdirectories included) because find interprets parameters in their order. Which means it's "find everything in ., delete what you find, then find files/dirs with this -iname."
Maybe this is old news for some, or uninteresting for others. Hopefully, it helps some people avoid this potential mistake in the future. I'm also curious how there's no idiot proof mechanism for this, at least "Are you sure you want to delete everything fool?" Type "yes, I am deleting everything with find, instead of rm -r, for no reason." Maybe there are some scenarios where this is useful? But I couldn't think of anything yet.
https://redd.it/ckabln
@r_linux
So... I was using the `find` command to look for some files and directories that I wanted to remove. I entered `find . -iname '*somestring*'` to see what would be removed. Then I started typing `find . -delete -ina` and at this time I stopped and thought to myself "Nah, -delete should go at the end." I thought the logic is "find where, what, do what/action."
I didn't think it mattered, it was just the way I often condition myself to do things right. Because while in Linux you have freedom to do a thing in one of 6783 ways, most ways are wrong, for what you are trying to achieve. It may work but it may be the wrong approach for your specific situation. Or it works, but only for 95% of scenarios... and one day, you'll hit that 5%. And I think that if you do things wrong out of laziness and just tell yourself "I know this is wrong, but I'm just lazy now because it doesn't matter" then this will leak in other tasks, where it WILL matter.
So I finally enter `find . -iname '*somestring*' -delete`
I later find out that `find . -delete -iname '*somestring*'` will delete everything in your current directory (subdirectories included) because find interprets parameters in their order. Which means it's "find everything in ., delete what you find, then find files/dirs with this -iname."
Maybe this is old news for some, or uninteresting for others. Hopefully, it helps some people avoid this potential mistake in the future. I'm also curious how there's no idiot proof mechanism for this, at least "Are you sure you want to delete everything fool?" Type "yes, I am deleting everything with find, instead of rm -r, for no reason." Maybe there are some scenarios where this is useful? But I couldn't think of anything yet.
https://redd.it/ckabln
@r_linux
reddit
r/linux - How I almost nuked my entire /home directory with 'find'
0 votes and 6 comments so far on Reddit
The Linux App Summit to be held in Barcelona in November. KDE and GNOME join forces to create a strong, free and open app ecosystem.
https://dot.kde.org/2019/07/31/linux-application-summit-coming-barcelona-november
https://redd.it/ckbddd
@r_linux
https://dot.kde.org/2019/07/31/linux-application-summit-coming-barcelona-november
https://redd.it/ckbddd
@r_linux
reddit
r/linux - The Linux App Summit to be held in Barcelona in November. KDE and GNOME join forces to create a strong, free and open…
0 votes and 1 comment so far on Reddit
Manjaro alternatives ?
After the recent news on manjaro I'd like another arch-based distro.
https://redd.it/ckdpze
@r_linux
After the recent news on manjaro I'd like another arch-based distro.
https://redd.it/ckdpze
@r_linux
reddit
r/linux - Manjaro alternatives ?
0 votes and 11 comments so far on Reddit
Rockbox user since 2010, now updated to 3.14. The USB Keypad mode when plugged in blows my mind!
When you have it plugged into your computer, to charge or transfer files, it also acts like a USB keypad, with different modes you can switch between. With one I can flip between slides of a presentation. Another gives me multimedia keys so I change the volume, skip track, pause music, it's all there.
I never thought that after all this time, I'd still discover something new about Rockbox. And the release notes from 2017 say my battery life should have doubled? Again, I'm speechless.
And it's not like these people are stopping. [Less than two weeks ago](https://www.rockbox.org/wiki/MajorChanges) they added Quake. I'm thinking of getting a third Clip+ as backup just so I can keep using Rockbox as long as possible.
https://redd.it/ckdbrt
@r_linux
When you have it plugged into your computer, to charge or transfer files, it also acts like a USB keypad, with different modes you can switch between. With one I can flip between slides of a presentation. Another gives me multimedia keys so I change the volume, skip track, pause music, it's all there.
I never thought that after all this time, I'd still discover something new about Rockbox. And the release notes from 2017 say my battery life should have doubled? Again, I'm speechless.
And it's not like these people are stopping. [Less than two weeks ago](https://www.rockbox.org/wiki/MajorChanges) they added Quake. I'm thinking of getting a third Clip+ as backup just so I can keep using Rockbox as long as possible.
https://redd.it/ckdbrt
@r_linux
reddit
r/linux - Rockbox user since 2010, now updated to 3.14. The USB Keypad mode when plugged in blows my mind!
0 votes and 3 comments so far on Reddit
Manjaro Developer on FreeOffice (Starts at 13:40) - xpost
https://youtu.be/-lB6I8bCZt8
https://redd.it/ckep2w
@r_linux
https://youtu.be/-lB6I8bCZt8
https://redd.it/ckep2w
@r_linux
YouTube
What Modern Linux Looks Like | LINUX Unplugged 312
Manjaro takes significant steps to stand out, and the shared problem major distributions are trying to solve, and why it will shape the future of Linux. Plus...
List of the best CLI apps that i use as a daily driver and my story of migration from GUI to Terminal
First i want to share my story of migration, but you can skip it to TL;DR and the list.
One day, around a year ago i woke up, opened the Gnome File manager and was feeling a bit depressed... It was the design that made me sad. Took me several hours to find a decent GTK theme, but it was still not okay, here and there something was a bit off.
I opened Google Play Music to find the music for the working day and it was loading and loading, spinner after spinner it took around 30 seconds to load the initial bloated slow GUI. At this point i didn't want to listen to music.
No music today, I've stared some radio station and opened Sublime Editor. Thank god (Sublime Devs), it loaded very quickly and was actually okay, the only GUI app that works fast and that i still use. So finally i started working and after hour of work I've opened the Gnome Calculator to solve some math equations. It started in 5 seconds, but when i tried to close it it just stuck unresponsive for around 10 seconds at this point i wasn't depressed anymore, i was laughing.
In the evening the same day I've decided to make a pizza, after the pizza was in oven i opened chromium, duckduckgo, started the timer for 5 minutes, after 10 minutes i switched to duck duck go tab with a timer and it started ringing with minus 5 minutes left. Probably because of new chromium autoplay policy - cheese on pizza was brown.
That was more than enough. That day I've decided that modern software is not only bloated, it sometimes can't even do the work it created for. I've started switching apps one by one.
The next day i switched from Gnome to i3 and started searching for replacement apps. After around a year i have a list of great apps that i want to share with you.
TL;DR: GUI apps are slow, bloated, ugly and sometimes don't work, CLI apps are fast and do their job well.
1. Calcurse - Calendar and scheduling application - helps me add tasks and events, keeps my day planned.
2. Cmus - The greatest music player for Linux. I usually download albums from Bandcamp (you can pay author approx $5 per album or download some of them for free).
3. Calc - Just a calculator.
4. Timer - Actually not an app. I have simple noscript for timer. I just write in terminal timer 10 and it sets the timer for 10 minutes with backwards countdown and alert. Useful for cooking and i love cooking.
5. Ranger - Great terminal file manager, supports panels and stuff, you can also bind your own keys, bundle noscripts and edit open with list. It's not so fast as nnn, as some people say, but it has great functionality.
6. Top - I don't use htop, because top is absolutely okay for me and gives all the info i need.
7. Units - Useful when you need to convert some metric units to imperial system and back.
8. Ncdu - When i need to keep track on directories/files size in my file system i use this utility. I used baobab before, but i don't like it's ugly GUI, so i found this app. I've also added an alias -x for ncdu to not cross the filesystem boundaries when scanning files.
I think that there are even more awesome apps, you can share them in comments.
https://redd.it/ckdk28
@r_linux
First i want to share my story of migration, but you can skip it to TL;DR and the list.
One day, around a year ago i woke up, opened the Gnome File manager and was feeling a bit depressed... It was the design that made me sad. Took me several hours to find a decent GTK theme, but it was still not okay, here and there something was a bit off.
I opened Google Play Music to find the music for the working day and it was loading and loading, spinner after spinner it took around 30 seconds to load the initial bloated slow GUI. At this point i didn't want to listen to music.
No music today, I've stared some radio station and opened Sublime Editor. Thank god (Sublime Devs), it loaded very quickly and was actually okay, the only GUI app that works fast and that i still use. So finally i started working and after hour of work I've opened the Gnome Calculator to solve some math equations. It started in 5 seconds, but when i tried to close it it just stuck unresponsive for around 10 seconds at this point i wasn't depressed anymore, i was laughing.
In the evening the same day I've decided to make a pizza, after the pizza was in oven i opened chromium, duckduckgo, started the timer for 5 minutes, after 10 minutes i switched to duck duck go tab with a timer and it started ringing with minus 5 minutes left. Probably because of new chromium autoplay policy - cheese on pizza was brown.
That was more than enough. That day I've decided that modern software is not only bloated, it sometimes can't even do the work it created for. I've started switching apps one by one.
The next day i switched from Gnome to i3 and started searching for replacement apps. After around a year i have a list of great apps that i want to share with you.
TL;DR: GUI apps are slow, bloated, ugly and sometimes don't work, CLI apps are fast and do their job well.
1. Calcurse - Calendar and scheduling application - helps me add tasks and events, keeps my day planned.
2. Cmus - The greatest music player for Linux. I usually download albums from Bandcamp (you can pay author approx $5 per album or download some of them for free).
3. Calc - Just a calculator.
4. Timer - Actually not an app. I have simple noscript for timer. I just write in terminal timer 10 and it sets the timer for 10 minutes with backwards countdown and alert. Useful for cooking and i love cooking.
5. Ranger - Great terminal file manager, supports panels and stuff, you can also bind your own keys, bundle noscripts and edit open with list. It's not so fast as nnn, as some people say, but it has great functionality.
6. Top - I don't use htop, because top is absolutely okay for me and gives all the info i need.
7. Units - Useful when you need to convert some metric units to imperial system and back.
8. Ncdu - When i need to keep track on directories/files size in my file system i use this utility. I used baobab before, but i don't like it's ugly GUI, so i found this app. I've also added an alias -x for ncdu to not cross the filesystem boundaries when scanning files.
I think that there are even more awesome apps, you can share them in comments.
https://redd.it/ckdk28
@r_linux
reddit
r/linux - List of the best CLI apps that i use as a daily driver and my story of migration from GUI to Terminal
3 votes and 8 comments so far on Reddit
New release of you-should-use zsh plugin (reminds you to use your aliases)
https://www.reddit.com/r/zsh/comments/ckasqb/new_release_of_youshoulduse_plugin_reminds_you_to/
https://redd.it/ckcsza
@r_linux
https://www.reddit.com/r/zsh/comments/ckasqb/new_release_of_youshoulduse_plugin_reminds_you_to/
https://redd.it/ckcsza
@r_linux
reddit
r/zsh - New release of you-should-use plugin (reminds you to use your aliases)
10 votes and 4 comments so far on Reddit