Page 1 of 1

Brain-dead move of the day

Posted: Wed Jan 13, 2021 6:51 pm
by ajgringo619
Although I'm not a noob, I sure felt like one for about 30 seconds today...

Was looking for a way to securely delete/wipe some files I had copied to a portable USB drive (temp storage while I encrypted my larger drive) and found secure-delete. After mounting the partition (in /media/me/d4293b91-5c41-4e21-829a-e850da683a1e), I checked to see what files were there - home and WD-MyBook. Everything's good...right?

WRONG!!! I ran this command and nearly soiled myself - sudo srm -lvr /home, instead of sudo srm -lvr home. As I'm watching my files disappear, I was able to kill the command in time before any serious damage was done. In my daily backups routine, I make a copy of /root and place it in /home. Only because my username starts with S was I able to kill the purge before it started on my files.

And I hadn't even started drinking yet! :oops:

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 7:31 pm
by AZgl1500
don't recall the exact events, but in my years with computers, ala programming the 1st Motorola 6800 microprocessor with a Hex keypad and a huge 64 byte memory chip, thru all of the Windows variants, I have managed to erase more than one backup or main HDD.

all it takes is a fuzzy thinking noggin, and "ah crap!"
Usually for me, after staying up way too late and seeing the sun peeking over the eastern horizon, and thinking "I am almost done, let's just finish cleaning up" and Zap!

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 7:58 pm
by antikythera
That's why I'm a bit obsessive in some people's view these days about snapshots and backups. Been there, made the same silly mistakes in the past and lost the important data :D

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 8:05 pm
by ajgringo619
antikythera wrote:
Wed Jan 13, 2021 7:58 pm
That's why I'm a bit obsessive in some people's view these days about snapshots and backups. Been there, made the same silly mistakes in the past and lost the important data :D
You and me both. I keep daily, weekly (4), and monthly (3) backups of all my data (on /home and from my Windows 10 user account); this doesn't include the same scheme for snapshots (thankfully BTRFS doesn't use nearly the disk space that RSYNC snapshots take up). This was all really necessary after I needed to reload Windows 10 a few weeks ago (my fault - I was experimenting with dynamic disks and wanted to revert).

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 9:03 pm
by Termy
OUCH. :shock: At least you stopped it in time. I did something stupid many years ago, costing me 1TB of data, most of which was very important to me; I was crushed. Luckily, I had a decent amount backed up. The messed up thing, is that it was my inadvertently misusing the dd(1) command in order to back my files up, which caused it all to go horrible wrong.

I'm amazed I ever came back to Linux, after that. With great power...

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 9:11 pm
by ajgringo619
Termy wrote:
Wed Jan 13, 2021 9:03 pm
OUCH. :shock: At least you stopped it in time. I did something stupid many years ago, costing me 1TB of data, most of which was very important to me; I was crushed. Luckily, I had a decent amount backed up. The messed up thing, is that it was my inadvertently misusing the dd(1) command in order to back my files up, which caused it all to go horrible wrong.

I'm amazed I ever came back to Linux, after that. With great power...
It's stuff like what I did that can scare users away from the terminal.

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 9:24 pm
by Termy
Amen to that. It scared me away from the terminal for quite some time. Now I'm a terminal ninja. :lol: Maybe I had to go through that? What better way to respect the power of the terminal than to be bitten so harshly by it?

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 9:36 pm
by ajgringo619
It reminds me of when my kids were little. We were at Grandpa's house for Christmas Eve and my youngest kept harassing him to take a sip of his "chocolate" drink. My son never questioned Grandpa again...

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 11:03 pm
by silvatech
ROFLMAO, that sort of stuff happens to the best of us and shows reasons for backups. Glad you were able stop it in time and did not have to take time to get the backups.

Re: Brain-dead move of the day

Posted: Wed Jan 13, 2021 11:47 pm
by zcot
Just run suicide-linux and you'll get really good at always being very precise! :lol:

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 12:35 am
by Pierre
since I'd also done the odd move like that one,
it also easier to keep things, that much more simple.

thus, nothing of importance, is kept on this Laptop,
and an couple of files, that I'm using, are backed up to an usb stick.
with everything else, on an ext usb drive, also copied to another drive,
as I've moved to another machine, over the years .. backups of those machine's files, still kept.
- - nothing is Encryted .. either.
:o

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 2:05 am
by AZgl1500
Termy wrote:
Wed Jan 13, 2021 9:03 pm
OUCH. :shock: At least you stopped it in time. I did something stupid many years ago, costing me 1TB of data, most of which was very important to me; I was crushed. Luckily, I had a decent amount backed up. The messed up thing, is that it was my inadvertently misusing the dd(1) command in order to back my files up, which caused it all to go horrible wrong.

I'm amazed I ever came back to Linux, after that. With great power...
that is the reason that I will never use Terminal commands for copying files, or working with partitions.
you just cannot see in advance what is going to happen.

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 11:32 am
by Termy
AZgl1500 wrote:
Thu Jan 14, 2021 2:05 am
that is the reason that I will never use Terminal commands for copying files, or working with partitions.
you just cannot see in advance what is going to happen.
Once you know what you're doing, it's not really an issue. That blunder with dd(1) was because I was following a bad guide and had absolutely zero clue what I was doing in a terminal, let alone with dd(1). Copying and moving files is comparatively trivial: cp OLD_PATH NEW_PATH and mv OLD_PATH NEW_PATH, respectively. You can see what's going to happen, as long as you understand what you're doing and look before you press enter; touch-typing is very useful when working within a terminal.

This comes from years of experience working in terminals almost exclusively. I always do all my file management in the terminal, because it's far more efficient and powerful. I don't even have a GUI file manager installed.

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 11:46 am
by AZgl1500
those path statement gets to be too long at times, no thanks.
NEMO works perfectly and hit F3 to get split windows, easy peasy

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 11:52 am
by Termy
AZgl1500 wrote:
Thu Jan 14, 2021 11:46 am
those path statement gets to be too long at times
Offset, I'd argue, by the ones which aren't long. Also, BASH completion makes it a cinch. Being a decent typist also helps. :P I can type out a very long path in a very short time, so it's not an issue for me. Obviously YMMV. It can get annoying when you have filenames with certain characters in them, such as spaces, but experience and muscle memory help there.

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 11:57 am
by AZgl1500
I have been a 120 wpm touch typist for nigh on 50 hears now, that is not the problem.

going brain dead, is more of an issue for me, as I was T-boned by a Semi truck back in 2008 and it destroyed a lot of my memory banks..... I cannot remember what I did 15 minutes ago, much less some command that I have not used for 13 weeks.

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 11:59 am
by Termy
Ah -- then, in your case, I imagine it would make a lot of sense to stick with GUIs for file management.

Re: Brain-dead move of the day

Posted: Thu Jan 14, 2021 12:28 pm
by missmoondog
ajgringo619 wrote:
Wed Jan 13, 2021 9:11 pm
Termy wrote:
Wed Jan 13, 2021 9:03 pm
OUCH. :shock: At least you stopped it in time. I did something stupid many years ago, costing me 1TB of data, most of which was very important to me; I was crushed. Luckily, I had a decent amount backed up. The messed up thing, is that it was my inadvertently misusing the dd(1) command in order to back my files up, which caused it all to go horrible wrong.

I'm amazed I ever came back to Linux, after that. With great power...
It's stuff like what I did that can scare users away from the terminal.
yep, been using linux for a few years but still scared to death of the terminal! have learned to do everything through a gui and not go deleting everything under the sun just because i can. haven't had any real issues in years.