[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
▼ Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: angrkibbr2.mp4 (955 KB, 720x960)
955 KB
955 KB MP4
I accidentally ran
rm -rf *
while in ~ instead of the directory I meant to be in:///
Luckily, I had a directory fairly high up in lexicographic order which contained files that had 0 file permissions. So the damage is manageable.
>>
hm no, that doesn't make sense then. I only had the recursive flag, not the force flag.
>>
>>110454878
make a backup anon
>>
>>110454878
alias rm='rm -i'

put this in your ~/.whatevershellrc file
>>
>>110455595
>>110454878
just never run rm -rf *

go up one directory and delete the directory. if you have to do this a lot and recreate the directory, make some wrapper that does it
>>
>>110454878
editing prod and you quickly slap out crontab -e but you typo and enter crontab -r

the creators of crontab are trolls for not asking if you're sure
>>
>>110456453
>the creators of crontab are trolls for not asking if you're sure
holy based...
>>
>>110455547
I know... I'll do it next week pinky promise
>>110455834
that's what I normally do, but the directory in question was a git repo, and I wanted to preserve .git
the safe thing would've been to
mv .git .. && cd .. && rm -r dir
, but oh well
>>
>>110456453
yeah, that one's rude, too. similarly for
history -d

I've also been bitten by
usermod -G
before, fun times editing grub's boot parameters to boot into root.
>>
File: 1778469779222864.png (1.38 MB, 1080x1001)
1.38 MB PNG
>>110454878
>>
>>110456825
as (partly) I need to rebuild my kot collection: save'd!!
>>
>>110456844
I got this picture from a guy on reddit, he saw this kot a few times when on the way somewhere and the kot was always looking very angry
>>
File: angery cat.jpg (11 KB, 320x215)
11 KB JPG
>>110456882
I haven't too many angry cats, unfortunately
>>
this is why even minimal btrfs snapshots can be very beneficial. even something as minimal as a single hourly snapshot which takes up basically no space can totally save you from this kind of mistake being catastrophic
>>
>>110454878
>I accidentally ran
rm -rf *
while in ~
How does that even happen?
>>
>>110457491
Yeah, I was planning on switching to btrfs or the like anyway. Will be doing that the same day I create a backup
>>110457574
When returning from some other task I often have to type in cd to get back to ~ cos that's the starting point of many endeavours so to speak.
Because of that, I had gone to my homedir faster than I had consciously registered. It's comparable to that mechanised opening of your app of vices on your phone, playing with your jumper chord, adding a space after a word even though a comma/full stop follows.
>>
File: 8tjv4vk2wh6h1.png (3.47 MB, 1450x1526)
3.47 MB PNG
>>110456825
>>110456882
>>
File: 1690339081645512.gif (824 KB, 450x253)
824 KB GIF
>>110457574
it can sound funny if you don't use the terminal much and only open it to do a specific task, but if you have multiple terminals and do longer sessions with it, you can run into situations where the working directory is not what you think it is
>>
>>110457857
yeah I think this was the first picture this guy posted lol
>>
File: 1768604117996954.jpg (18 KB, 456x456)
18 KB JPG
>>110454878
>So the damage is manageable.
for a human
>>
>>110454878
I use zfs so this wouldn't affect me lol
>>
>>110454878
Well, did you manage it, OP?
>>
>>110455595
only pussies do this
>>
>>110457574
people stop paying attention sometimes. one time i thought i was in a chroot mode when i infact was not
>>
Crazy how I have never had this problem in windows.
>right click
>delete
>go to gym
>have sex with young japanese girls
>never worry that I accidentally deleted the wrong thing.
>if I did go to recycle bin
Why doesnt Linux get a Recycle Bin?
>>
>>110462545
it does, though using rm directly won't use the recycle bin.
protip: using del in a windows terminal won't use the recycle bin, either, if op used a graphical file manager like you would in windows, it would use the recycle bin the same way it works on windows, this isn't a windows vs. linux issue
>>
>>110462545
>>110462558
oh another thing is that even in windows you can still get overconfident using explorer. shift+delete will delete something directly, and more experienced users can get used to using it
>>
>>110454878
next time run shred first



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.