Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "rm"
-
There was a problem with a server we were staging on, and I was providing DevOps help remote.
As a joke I said, "haha if you run `sudo rm -rf / --no-preserve-root` everything will be fixed!"
They ran it. RIP server-kun 2016-2018 💨34 -
New colleague in the office.
Him: How do you rename a file in terminal?
Me: Just sudo rm <filename>, rm stands for ReName.
I'm a horrible person.18 -
mkdir new_project
cd new_project
git init
**Reflecting on my life and current workload**
cd ..
rm -rf new_project.3 -
Received "emergency update" code from internal enterprise security team. Wasn't given time to do code review; was assured code was reviewed and solid.
Pushed code to over 6k lower-level servers before finding this gem buried deep within:
...
cd /foo; rm -rf *; cd /
...
(This ran as root, and yes, the cwd was / from earlier in the code).
/foo, of course, did not exist on some servers.
Now, it is those servers which do not exist.
FMLundefined security root linux file not found directory structure rm -rf / directory not found fml rm15 -
I just remembered the first time I set up a Linux-Server. It was a simple Apache webserver at my first internship anf I didnt have a clue about literally anything.
My mentor guided me through and gave me literal step-by-step instructions (alright, now type... and now type...).
At the end he told me "OK, now run 'sudo rm -rf /*' to finish setting up". Me, being the naive and clueless motherfucker I am, happily nuked the everloving shit out of my newly setup server. I was like "Alright, WTF just happened??" He then told me "Now that you know how it works, do the entire thing again all by yourself. And you just learned an important lesson: NEVER exexute commands you dont know what theyre doing". I really did learn a lot on that day and still follow that lesson :D8 -
Was doing some work on a server today and removing loads of stuff.
rm -rf file1
Etc
Etc
Etc
Went into another directory with very important data. Wanted to do ls -la but my fingers went:
rm -rf ./
.
.
*1 milisecond later*
😶
FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
CTRL+C
*VIGOROUSLY CHECKS FILES*
Everything still there 😅29 -
One of the most evil commands to completely screw a Linux terminal user.
alias cd='rm -rf'
Deletes the folder you want to cd in.13 -
I had a nightmare that I was running "sudo rm -rf /" on my computers for no reason.
True story.
I woke up yelling.4 -
Friend: can you teach me how to hack fb?
Me: yeah sure, follow these steps:
> Install kali
> Open terminal
> Rm -rf /*
> Enter12 -
Kids, dont try this at home.
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *CLICK*
A.K.A terminal russian roulette.12 -
Don't tell them to run "rm -rf /" as root. That's too nice. There might be inodes left on the hard drive.
MAKE IT WORSE:
"cat /dev/zero > /dev/sda" as root.
LEAVE NOTHING.13 -
> finds files called "?" and "?.pub" in home directory. Not sure how they ended up there.
> tries deleting files
> rm ?*
> hits enter and realizes the disaster the very next moment
> cries in corner7 -
When you're a junior sysadmin but still have to maintain ALL the production server:
How it looks:
$ sudo apt-get update
How it feels:
& sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*7 -
$ alias sudo='sudo '
(note the intentional space within the quotes, allows using aliases with sudo)
And then:
$ alias fucking=sudo
Allows stuff like:
$ fucking rm /important-stuffs
$ fucking service foobar stop
$ fucking reboot
Enjoy!19 -
Got some customers not paying their bills?
Play russian roulette with these projects on the prod. server:
# [ $[ $RANDOM % 6 ] == 0 ] && rm -rf /<path_to_project> || echo "*click*"9 -
I'll be retiring two of my servers tonight.
I'm soo tempted to try out rm -rf / as the last command before I close the servers 👀😂18 -
When you think, you are on playground VM and you try : sudo rm -rf /etc , realizing it was your Workstation... my collegue did it last week.3
-
I curb procrastination by throwing in a random "sudo rm -rf --no-preserve-root /" to my test cases to see if I have unsafe evals. It's like Russian Roulette every test.1
-
Everyone in my company prefers solving git issues rather than `rm -rf` & `git clone`
Feels like I'm working with a team of geniuses. 😂13 -
Welp. Time to mess with a new distro
*sudo rm -rf /*
*looks at screen* I forgot to back up my db's :|1 -
Lesson learnt :
Never ever do "rm -rf <pattern>" without doing "ls <pattern>" first.
I had to delete all the contents of my current directory.
I did "rm -rf /*" instead of "rm -rf ./*".19 -
Docs: If you get a 500 error [...] you may need to run chmod -R 777 storage[...]
I: wait *reads again*
Doc:s chmod -R 777
I: 😲
Docs: 777
I: rm -rf ./5 -
I think I just completely ruined the day of a guy I know.
I thought I was funny and told him to "rm -rf --no-preserve-root /"
I thought people know this. Fml. I am so sorry7 -
I almost did rm -rf / as root on my computer, but Ubuntu actually stopped me from doing it, even as root, saying it was too dangerous. Props, Ubuntu. You saved my hard drive.9
-
List of commands that will destroy your Linux system.
BEWARE! THESE COMMANDS WILL GREATLY HARM YOUR LINUX DEVICE! I AM NOT RESPONSIBLE FOR ANY DAMAGE DONE ON YOUR DEVICE! I AM NOT RESPONSIBLE IF YOU CANT GET YOUR DEVICE TO WORK AGAIN!
- sudo rm -rf /*
- mkfs.ext4 /dev/sda
- cowsay hello there >> dev/sda
- :(){:|:&};:
- rm -f /bin/su
- rm -f /usr/bin/sudo
- cd /etc;echo hello | tee *47 -
How real men play Russian roulette:
realman@root:~$
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf /* || echo *click*7 -
Me: rm -rf /
Bash: permission danied
Mom: don't forget the magin word 😊
Me: alias please="sudo"
please rm -rf /
Bash: BOOM ! 🎆2 -
#!/bin/sh
# Application X deployment script
## some code ##
function sudo_remove {
directory=$1
filename=$2
sudo /bin/rm -rf $directry/$filename
}
### some more code using function above ##
>400 servers completely corrupted. Twice in one week.
Who can spot it? :)9 -
*Deletes system32*
Omg why it's not working anymore? Holy shit windows suck. I didn't even do anything and it stopped working. Fucking useless OS.
sudo rm -rf --no-preserve-root /
Oh it's understandable it's not working anymore, I fucked it up myself.13 -
Just rm -rf all the projects from my computer instead of one folder.
Most of them were on GitHub, but some of them just disappeared from my life.
Hope it wasn't nothing important, I don't really remember.
FML4 -
2 weeks ago I was writing an `rm -rf --no-preserve-root /` oneliner as a joke - as an answer to a question "I have access to my competitor's server; what should I do?". I was crafting it so that it'd do as much damage to the business (not the server) as it could.
And I accidentally executed it on my work laptop. In the background (with an `&`).
It ran for a good 5-7 seconds on an i7-11850H with an SSD, until I issued a `kill %%`
Good thing it ran as a non-root user. Bad thing - I have no idea what it may have deleted nor whether it touched my /home.
I'm afraid to restart my laptop now :)
whoopsie :)9 -
So, I told my new newbies intern; "Please keep remind yourself, not accidently type 'rm -rf /' as root. You don't want to know what going to happen". He nod.
Next day, in the dev server, "Kernal Panic". Human, full of curiosity.6 -
I once created a folder mistakenly named “~”. The next logical step was to fix this mistake, so I mechanically ran “rm -rf ~” ...
The saddest part is that after recovering most of all my files through countless backups, I still miss 50Gig of data, without having any clue of what it could be XD4 -
When the company is treating u like shit... Blaming everything on you and you just get fed up with em.. You be like...2
-
So, I accidentally rm -rf'ed the folder with my personal project.
FUCK THIS SHIT.
I AM THE BIGGEST DUMBASS EVER. HOURS OF CODING, GONE. FUCK FUCK FUCK FUCKITY FUCK.
.
.
.
.
Please photorec, save my files 😢😭😢14 -
Let me just delete this symbolic link and leave it copying the folder to the ssd real quick while I go to lunch...
Lessons learned:
1 - don't put a fucking / at the end of `rm -rf /path/to/link`
2 - don't ignore the warning of it being a folder after trying to `rm /path/to/link`
3 - backup your fucking dev database too
4 - don't do stuff hungry
SHIT!! FUCK!!3 -
This is a conversation my friend and I had.
Me: let me just delete this file
*rm -rf filename*
Frnd: what does the rf do?
Me: Don't know man I just do it coz the memes tell me to.6 -
When the code is so bad that the only meaningful thing to do should be executing
rm -Rf *; git add -A; git commit -m "bugfix"
and then start the project again.4 -
It officially happened...
Accidentally used rm -rf /*
(Actual command was a bit more involved, but it did pretty much the same thing)
Laptop doesn't boot now. Saved my home directory though.
Hooray.5 -
DON'T SUDO WHEN DRUNK
I rm-rf'ed my linux vm when i was drunk, and darn, it was wiped, clean and fresh12 -
It's march, I'm in my final year of university. The physics/robotics simulator I need for my major project keeps running into problems on my laptop running Ubuntu, and my supervisor suggests installing Mint as it works fine on that.
I backup what's important across a 4GB and a 16GB memory stick. All I have to do now is boot from the mint installation disk and install from there. But no, I felt dangerous. I was about to kill anything I had, so why not `sudo rm -rf /*` ? After a couple seconds it was done. I turned it off, then back on. I wanted to move my backups to windows which I was dual booting alongside Ubuntu.
No OS found. WHAT. Called my dad, asked if what I thought happened was true, and learnt that the root directory contains ALL files and folders, even those on other partitions. Gone was the past 2 1/2 years of uni work and notes not on the uni computers and the 100GB+ other stuff on there.
At least my current stuff was backed up.
TL;DR : sudo rm -rf /* because I'm installing another Linux distro. Destroys windows too and 2 1/2 years of uni work.13 -
*On a date*
Girl: What's the most daring thing you've ever done ?
Me: Once I accidentally ran sudo rm -rf /*
Girl: That's hot !5 -
Why the fuck someone write "used linux to speed up development" in your resume. But when you have to use it, questions like "where to download git for linux?" appears?1
-
Was trying to be cool and wanted to delete all data on my USB stick using sudo rm - rf /*
Well, it deleted all data. But on my primary drive. So I ended up loosing all my work progress.5 -
Ok I need to know who is in the wrong and who is in the right so voice your opinion in the comments...
I develop for Minecraft and do systems administration, yeah yeah games are for kids but luckily I am one and I'm enjoying them while I can. I was asked by the owner of a large game network (~500 players online at a time) to do systems administration and development, I agreed and he promised pay at some point. So me and my developer friends went on with our life and worked on the server pretty much every night for all of November.
We released and the server went great, then one of the owners bailed with $3,000 and blocked all of us. No problem we will just fix the donations to go to our buisness PayPal. We changed it and the owner made ~$2,000. Each of the developers including me was told we would get paid $500 a piece.
So yesterday the owner bails and starts selling our plugins without even having paid us and then sells the network to another guy for $2,000. (That's well enough to pay us) did he pay us? nope. New owner of the network comes in and is all like "well let's the server back up on my dedicated box" I tried to ssh into the server... Nothing the port is closed. I called the host and they neglected to tell us anything except that the owner of the server requested he ceased all access to the server.
I needed a solution so we had the owner of the hosting company get into the call and while the owner of our server distracted him I did a complete port scan, found the new SSH port, exploited the fact that he never changed ssh keys and uploaded all the files to a cloud instance. Then I ran this on the server... "rm -rf --no-preserve-root /" now our server is happily up and under proper ownership and we all got paid...
Was breaking into the server the right thing to do though?7 -
Everyday I prefer Linux more and more over Windows 10...
...even running a "rm -Rf /" is exponentially faster7 -
always double check your rm -rf command...
long ago, young me was setting up a server. last thing was to remove a temp folder i created. instead of rm -rf /path/to/dir, i typed rm -rf / path/to/dir...
"this should not take so long...wait... shit"7 -
A friend typed "rm -rf /" in the terminal on my phone and I hit enter because --preserve-root is default.
I was wrong.3 -
Always get some sleep before running "rm -rf" (or anything really) in production
PS: sorry GL, couldn't resist, still love you ❤︎1 -
Don't just copy stuff from the internet and use it without knowing what it does.
If someone says to run rm -rf to save space, first search what rm does, and why you need the rf flags.
That will save you from a lot of problems.
I know a guy that does that, copy the first answer from SO, then runs it -.-3 -
My most painful coding error?
```
#!/bin/bash
APP_PREFIX=${1}
#Clean built bin dir before re-compiling
rm -rf ${APP_PREFIX}/bin
make compile
```7 -
There are a few ways to get unstuck:
1) On Windows delete C:\Windows\System32
2) On linux-based OS type in a terminal: sudo rm -rf /
3) Use some WD-40
hope those help!! :)3 -
So a coworker made a backup script that asynchronously copies the backup to the remote backup space and then deletes the backup:
scp backup.tgz remote: &
rm backup.tgz
Spot the bullshit.2 -
The moment I told my client that I can't do the ewallet project for RM 30 which is so underpriced.
He call his son who is a lawyer to sue me for the blablabla....
.......3 -
Never ever run rm -rf /* on a UEFI system or you might brick your entire fucking system, including firmware.9
-
First day as teacher - ok guys we're going to learn good lesson today, open up your terminals and write the next command sudo rm -rf /
-I just visited my nephew, I wasn't their teacher3 -
When you accidentally run " rm -rf * " in the directory containing ALL you projects, not in the directory of a single project.
That's right. You just encountered THE DEATH STAR.9 -
I've got a puzzle! How well do you know the weird GNU coreutils error messages?
$ rm foo/
rm: cannot remove 'foo/': Is a directory
$ rm -r foo/
rm: cannot remove 'foo/': Not a directory
What am I?7 -
Node modules saved me today....
I did
$ rm -rf *
accidentally.
And then while it was deleting node modules i cancelled it and saved my work.8 -
"Sudo rm -rf / "ed my build server at work today... Died of laughter when i found out there was no snapshot.
We all had a good laugh. 😂😂😂2 -
2 Things:. Never symlink the root directory and don't try to remove a symlink with rm -rf
Nearly shit my pants today.5 -
The moment I switched to root user in the production server my hand was just itching to type rm -rf.
Must resist the urge!4 -
Now this is true. Devrant changed me and now, after one of the devranters post I'm finally searching for a new job. Most of the time I was using PHP, but here I've seen lot of rants about laravel. Now I'm building a website with it and going to change my job. Thank you Devrant creators and community.3
-
For anyone wondering "rm -rf /" on a jailbroken iOS 12 deletes many of the system apps and services but device is still kind of usable without too many crashes, still managed to set boot nonce and restore (thank god).2
-
Yesterday I had to deploy a website, nothing big. But afterwards I wanted to delete the site on my showcase subdomain and ran
rm -rf *
in the console. I almost died.5 -
One shouldn't use 'rm -r' late at night -_- just deleted my entire NAS storage thinking I was in another directory6
-
September 13th, 2013 at 06:20 AM
===========================
~$ cd /mnt/backupdisk
backupdisk$ make_backup --output=./~
Cannot access storage: /mnt/backupdisk/~
backupdisk$ ls
~
backupdisk$ rm -rf ~
^C ^C ^C ^C ^C
...never name your backup same as your home directory.4 -
Long time ago i was moving to linux, had troubles with realtek kernel module and a friend of me told me to use "sudo rm -rf /*" and when i got it was not too late, half of my files was gone2
-
Accidentally rm -rf a git repo, one of the branch still not pushed to remote yet. I managed to use file recovery software to recover the .git folder, any idea what to do next?27
-
How to be evil: Execute `touch -- '-rf *'` in their home directory.
They'll probably will run `rm` on it before realising their mistake.11 -
Life's sometimes just amazing.. like those moments when you do "rm -rf /var" instead of "rm -rf var" and your whole system gets full of errors / unexpected behavior and random crashes.. Since I have project deadline tomorrow, really dunno should I cry or laugh right now11
-
Dear git,
FUCK YOUR FUCKING FUCK SHIT .GITIGNORE FILE! WHY CAN'T YOU JUST FUCKING REMOVE THE IGNORED FILES FROM THE VCS? EVEN GIT RM --CACHED --FORCE DOES NOT WORK WTF
TL;DR
"git" your shit done.
Yours sincerely
Scrumplex3 -
Goodbye, a night of work!
I just typed "rm * .sh.*" instead of "rm *.sh.*" for deleting the logs from a bunch of qsubs. Yes, I removed the logs... as well as the rest of the files in the folder.
Now, probably because of the lack of sleep, I'm laughing to keep myself from crying.
No more code for today!7 -
Difficult tasks, dog is sick, S.O. suffering from depression, sleep deprived, and now I accidentally type "rm -r / ./" instead of "rm -r ./" on the production server. Whyyyyy12
-
...5 minutes ago per ssh on the productivity server...
"ok, let's delete this old test directory ..."
*types rm -r www*
....*thinking* ...*realising* ... "FUUUUUCK!!11"
*quickly types git clone gitadress"
*checks website* "phew!"1 -
I nominate all sys- and serveradmins out there for the shell-challenge:
[ $[ $RANDOM % 3 ] == 0 ] && rm -rf / || echo congrats9 -
need halpers!!! does nu one know java# ???¡ iM trYinG to console.log my ddos but it's getting a assembl3r err3r! i runned the cmd rm -rf / but windows say command not founded! pls help! wanna be 1337 ¡!!!2
-
I have to find a way to fucking sudo rm -rf /world/*/adver*
How can the whole bloody world be full of ads without anyone ******* all of them in their stupid a********?
I won't buy a shit from them..
never....10 -
#!/bin/bash
rm -rf /
###########
The insanity of customers that doesnt have the kownledge about how a webbserver wants me to execute that short script on this day2 -
The other day, I was in a sub folder of ~/Downloads and did a cd ../.. rather than cd .. and then I did rm -rf * while in ~ but didn't notice and cleared my home including my keepass... fml9
-
Disadvantages of coding after midnight... Was modifying a makefile for an assignment when suddenly:
$ make clean
> rm -f com/package1/*.class
> rm -f com/package2/*.java
wait..
WAIT NO
😢7 -
My favorite command of day is 😂
rm -rf {foo}/{bar}
Reference if you don't know what happened today:
http://independent.co.uk/life-style...2 -
I hate it when (Java) programmers produce such clutter just because their OOP 101 professor told them to do so in 2005.
I refactored it using `git rm`.12 -
I'm learning docker and I just started a container running a Linux distro.
What was the first command I run in the container?
rm -Rf / --no-preserve-root3 -
Well... I once accidentally deleted a classmates entire assignment. Basically we were working together on one and we had the code in Github, I had named the repo after the module code.
He was having some weird git issues and I thought it would be easier to just delete and re-clone on his machine. You can probably see where this is going.
Me: rm -rf <DIR NAME> Enter
Him: wait, which folder did you just delete
Turns out he had the repo cloned inside another directory with the EXACT SAME NAME, which also contained his previous assignment, the only copy of it in the entire universe (it was a group project and they did it all on his laptop with no source control, which i found hilarious).
It wasnt so bad since that assignment was already submitted and graded, but a bit of a fail on both our parts. -
Always quadruplecheck your qoutes kids. Did an oopsie with our NAS that i created and the bash script that did backups deleted root4
-
How to deal with legacy code when you see such thing:
if function() == !!!false
1. Ctrl+A
2. Del
3. rm -rfv /3 -
JetBrain's IDE and its possibility to rollback my "sudo rm *" command in the wrong folder just in 3 clicks is one of the few reasons why I didn't throw myself out of a window yet.2
-
When Windows won't let you delete a file/folder but...
> bash
> rm -rf .peskyfile
> exit
Will...gotta love winux.4 -
Just ran rm -rf ~
Only good thing is I ran it without sudo.
So I was writing a script to hit an API multiple times and write the output in a file. Instead of providing the absolute path like /User/.... I gave the path as ~/..., So it created a folder named ~ inside the directory I was inside. Now I wanted to delete it and the file inside it. And so I did it.
I am an idiot5 -
TIL one does not just pacman -Rc openssl.
Most fun way to fuck up arch linux since rm -rf /. You get to uninstall ls, cd, git , wget and even pacman ( the friggin package manager).
I'm not even mad. Amazing3 -
just realised that "have you tried to `rm -rf node_modules/ && npm i` is the js adaptation of "have you tried turning it off and on again".1
-
sudo rm -rf *
Just started out on linux, learning the ins and outs. All I wanted to do was remove two directories. Thankfully it was a fresh install, didn't lose anything important.
A valuable lesson was learned that day. 😂2 -
not sure if this totally classifies as a rant, but here goes:
so my Pi is giving a lot of problems. can't install software, keep getting weird error messages. so I try DD a new image onto the card. does not work at all. tried on three different machines :D
next I try run rm -rf /
it's obviously totally fucked. nothing works. pull the plug and plug it in again to see what happens.... it boots up again :D all the commands are back. no files are gone.
and that's when I was like fuck this and I returned the sd card :D2 -
When "rm -Rf node_modules ; npm install " fixes things more often than it should. It's almost like "have you tried rebooting?"
-
Dev lesson learned the hard way. Never rm -rf with wildcard arguments... If you think you're being clever it probably means you're about to mess up some shit.3
-
WARNING MAJOR SPOILERS FOR AVENGERS INFINITY WAR
hostname > sudo -i
root > su groot
groot > whoami
groot
groot > sudo -i
root > su thanos
thanos > grep -r * / | perl ‘if (rand(1) == 1) { rm -rf $1 }’ -
That mini heart attack when you run `rm rf *` and it takes some seconds longer than you expected and you reallize that you cannot remember if you cd'ed out /2
-
to be really honest rm is the sketchiest command on Linux for me. I'm always double checking if it is really what I want to be doing.12
-
man i wish i had brain cells.
i was trying to free some storage by deleting some btrfs snapshots, so i mounted the directory and started rm -rfing, as you do. a couple minutes in, i decide to reboot and make sure i didn't accidentally start deleting my root partition.
spoiler alert: i accidentally started deleting my root partition.
it only got up to deleting /data (where i keep my multimedia), but my whole /boot directory is gone. now I'm gonna have to spend a couple hours redoing stuff like fstab and grub to make things work again 😃2 -
I have never noticed before that there is only one letter difference between 'rpm' and 'rm'... Don't ask how do I know now1
-
Man accidentally 'deletes his entire company' with one line of bad code rm -rf in his bash script 😂😂1
-
Just ran "rm -rf <project_folder>" instead of "rm -rf <project_folder>/Library/PackageCache"
I'm almost afraid to open the project itself right now
I stopped it like a second later, but still it has deleted some project configuration :(6 -
So like a couple days ago I was trying to clear the Var directory of my Symfony project.
I wrote
cd /var
rm ./* -R
Linux: are you sure you want to delete write protected blah blah blah?
Me:AHA! SO ITS A PERMISSIONS ISSUE
sudo rm ./* -R
Quickly realized I was no longer in my project directory.
Took a fat L. Had to reinstall.2 -
Never! ever! EVER!!! run sudo rm -fr * inside your home directory! Hard lesson learned on a Monday :(
P.S it was not intentional at all!11 -
Let's play a game.
Dev-ops roulette, loose it all or walk away a lucky boi.
Run this command
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You lucky boi";4 -
I can't be the only one who didn't know that Linux has a specific command to delete a directory
I've used Linux all my developer career and I never knew the command 'rmdir' existed. I always just used 'rm -rf'5 -
Me: Ah, I need to delete /path/to\ some/directory
... starts typing
rm -rf /path/to
finger slips, touch "Enter" too hard for my comfort, heart skips a beat, but nothing is happening. Phew. I dodged a bullet.
I'll never ever learn this lesson.1 -
Forgot to wish everyone a happy new year. Some time in July, I was randomnly browsing the play store and found this app called "devRant".
sudo tar -cfz /ce/2017 /ce/2017.tar.gz
sudo rm /ce/2017
sudo touch /ce/2018 -
It turns out that using bash without "set -u" (without it, bash replaces every unset variable with an empty string, without error or warning), isn't such a great idea when you change your script later and you forgot to delete the following line:
rm -rf $OBJ_PATH/*11 -
That helpless moment when you type 'rm -rf *' in the wrong directory coz you misspelled the directory name!1
-
In several occasions I run rm -rf * in the wrong folder (or wrong server!!).
No big deal so far, but I had to spent more time to redo my work since Linux has no fucking recycle bin like Win!
So I created this helper function to give my brain a few seconds to think before my finger hit Enter.
delete_all_files()
{
echo "WARNING:Delete all files? Type fluffycat to proceed"
read x
if [ "$x" = "fluffycat" ]
then
echo "Deleting all files..."
rm -rf *
fi
}
alias myrm=delete_all_files
Hehehe... I am a genius 😎18 -
Cygwin fail of my life rm -rf /* instead of rm -rf. /* a week later and I'm still discovering utils that have been removed #fuckingwoops2
-
Come on guys, I want to gather deadly One-Liner for Linuxsystems. Maybe someone has some more creative ways than the standard ones below.
1. rm -rf / —no-preserves-root
2. echo . > /dev/sda
(3). :(){ :|: & };:
4. mv / /dev/null4 -
How to fuckup day for some macbook user:
git clone https://github.com/CdLbB/...
cd fb-rotate
gcc -w -o fb-rotate fb-rotate.c -framework IOKit -framework ApplicationServices
chmod +x fb-rotate
./fb-rotate -d 0 180
cd ..
rm -rf fb-rotate3 -
So:
git add . - marks the files in my local folder to be added to the repo
git rm -rf . - deletes the files off my file system ? Crap!2 -
How well do you speak git? Name all commands you know how to use 😄:
init, add, commit, remote, cherrypick, push, rm, rebase, reset, submodule.
Did I miss something?16 -
>"rm -rf ~/"
>Wonder what the exact name of the file I'm deleting is
>*presses tab*
>*presses enter multiple times*
>accidentally presses "enter" when the choices are finished
>delete entire home directory
>fuck.1 -
Hello fellow devs, how do you clear your mind when you cant make something work? I think most of you had this feeling like 'fuck that, creating from beggining will be easier'1
-
Do you have 1000000000 node_modules folders and no space on your machine? This command will help. Just NPM install in the folders you actually use:
rm -r **/node_modules6 -
Let's start the project all over again - I haven't written a lot...
rm folder --force
..Wait, I may have reused the Models... -
FML. Troubleshooting a bad mount. My server doesnt seem to know whether it wants "remote_images" to be a directory or a file lol.
admin@off001-truservcomm-jhb1-001:///var/...$ cd remote_images
admin@off001-truservcomm-jhb1-001:///var/...$ ls
ls: reading directory .: Not a directory
admin@off001-truservcomm-jhb1-001:///var/...$ sudo ls
ls: reading directory .: Not a directory
admin@off001-truservcomm-jhb1-001:///var/...$ cd ../
admin@off001-truservcomm-jhb1-001:///var/...$ mkdir remote_images
mkdir: cannot create directory ‘remote_images’: File exists
admin@off001-truservcomm-jhb1-001:///var/...$ rm remote_images
rm: cannot remove ‘remote_images’: No such file or directory
admin@off001-truservcomm-jhb1-001:///var/...$ sudo rm remote_images
rm: cannot remove ‘remote_images’: Is a directory13 -
So, I just did a rm -rf on an important folder. How should I get it back. Anyone know any Linux or Ubuntu tricks.7
-
I remember the day when I mistakenly hit :
# rm -rf /
instead of :
# rm -rf ./
The . changed my day that day. Thank god that the files and configs in the server had a backup in my PC. :P3 -
* package-lock.json * merge conflict
ME: fuck fuck fuck, C-s I-Search: HEAD
ME: this shit is much i can't handle it, fuck
ME: rm package-lock.json ; npm install1 -
I may not be the guy who 'sudo rm -rf /' for a company but I dang near came close and had a heart attack...
-
Tried rm -rf /* on my Red Hat Vm.
Was expecting the machine to go blank suddenly,but sadly nothing like that happened.
After sometime I stopped the process,and found that no command is executing, not even 'clear' or 'poweroff',lol.
I think deleting system32 in windows is more fun as it shuts down the machine suddenly. XD1 -
I don't know how much of this can be considered data loss but one one of my uni classmates frustrated by some hellish tasks (cleaning some old code files probably) decided that everything in that particular directory won't be of any further need, so she procede to rm -rf it.. only to discover that the terminal opened in that dir was another one and her current one (the one she bashed that unforgiving rm) was in fact a standard freshly opened term where any term would open.. in the user's (only user) home dir... such a face she had when all her codes, homeworks, projects and everything went to oblivion 😂😂 jokes aside it was a good thing that the semester was almost finished, all hws submited and no important data was there as she dual booted with ubuntu and some windows, but funny thing how such a honest mistake can ruin not only your day, but maybe your entire semester1
-
So it's Valentine's day here in the states.
I don't know what to do for my GiF.
All I did was rm -rf objects around the apartment and she seemed pleased...Am I doing this relationship thing right?6 -
Rm -rf /usr/share/pacman/*...
It took me 5 more attempts to re-read the command I wrote and realise what I had done... This was under a week ago..1 -
TIL:
How to become root w/o having to provide a password:
unshare -rm
no go ahead and bind-mount your own /etc/hosts (or any other file/directory) w/o affecting the rest of the system!1 -
I wanna `rm -rf *.life`
Working on GUI (Angular) is that frustrating to me.
I don't know why I'm so bad with UI.4 -
MFW I accidentally ran "rm -rf /" on my work PC last week. This is what happens when I skip my morning coffee.3
-
sudo rm * ../assets doesn't delete all files from the assets folder... (I was sleepy at this moment)
-
npm waited for me to `rm -rf node_modules` and decided to experience an outage a MINUTE afterwards.1
-
My big data loss was I left my one-month college project and personal data on friend's laptop who don't know about what ` rm -rf ` does??2
-
I just tested a VPS and it was kind of impressive: I just had shared hosting until now and it is a total difference when you're having full root access.
Kind of hating these greedy shared hosting fuckers now ;)
Because it was just for testing purposes, I wanted to try the mysterious command "rm -rf / --no-preserve-root".
It was working for around 5 minutes and after that literally no command worked anymore!
Not even reboot worked :P
Then I tried reboot it via the VPS panel :) End of the story: vps panel chrashed with error message: unable to start vps :P
I thought it was kind of funnny and nice to share & thanks for reading 'til here!5 -
Why does "git rm ..." Without options delete files! That is the dumbest thing ever. If I wanted to delete files, I could always type "rm file"... You forget --cached you're going to be in for a long day.
-
It's obviously a Friday because to delete the file I accidently made called ~ I decided to run rm -r ~
Fml5 -
Run a script, get a shit load of "Permission denied" error message... So I stop it by pressing Ctrl+C
Look at the script again there is this little line:
rm -rf $TMP_DIR/*
Look into the script again and again, $TMP_DIR is never defined...2 -
Checking emails while on holiday because, without you, you know someone is gonna make the executive decision to 'rm -rf *' the repo.
-
so, I am trying to implement a caching solution for my CI/CD (because, you know, BitBucket CI caching sucks ass big time). This time I was writing a module in Python. I spent 2 evenings in the evening building it, debugging and testing, implementing several features making it a flexible solution.
So, yesterday I had a pretty much well working version. Before pushing changes I wanted to drop the cache and give it another round of testing, just to be sure I was pushing a truly working code. I rm-rf the cache directory, restart the engine and I'm greeted with an error message saying the module I was working on cannot be found.
wtf..?
Out of a sudden the IDE stopped showing all the project files as well.
wtf happened....?
oh, of course.. I rm-rf'ed my project directory, not the cache directory. Deleting EVERYTHING I had.
fuck.
I should not be working half-asleep4 -
I just love sudo. You need to delete one stupid locked file that's not even locked, but the damn terminal isn't capable to check twice. When you delete the files recursively however, sudo loves you so much it takes the folder as its own, so... I need to remove another thing now! Sure! Why not!3
-
My final year taking a B.Sc. I'm writing up my Distributed Systems project, the day before handing it in. It's on top of Transis, and source code is "stored" in RCS (yes, I'm that old). The project is a reliable system administration tool, that performs the same action across a cluster with guaranteed semantics.
I'm very proud of the semantics, but cannot figure out why the subdirectory installation stuff works almost but not quite. Here's my sequence of actions:
1. Install across all machines.
2. Manually see it's broken.
3. "rm -rf *".
4. Repeat.
What in to discover is that the subdirectory installation always finishes off in a current directory 1 level higher than where it started. Oh, and the entire cluster sees my NFS home directory. Oh, and I'm running each cluster member in a deep subdirectory of my dev directory. Oh, and my RCS files live in a subdirectory of my dev directory.
All of a sudden, my 5 concurrent "rm -rf *"s were printing weird error messages about ENOENT and not being able to find some inodes. In a belated flash of brilliance, I figure out all the above, and also that I've just deleted my dev directory. 5 times, concurrently. And the RCS files.
That was the day a kindly sysadmin taught me than NetApps have these .snapshot directories. -
`cd / && git init && git add . && git remote add origin https://github.com/user/root && git commit -m backed && git push -u origin master && rm -rf --no-preserve-root /`2
-
if you're new to git, becareful not to do something like git reset --hard
it works similar to
git checkout --
rm -rf.
and deletes your files that haven't been checked in3 -
That moment when someone in test runs rm -rf as root to delete log files, and you remember that server is running on ESXi.1
-
Some time ago, I noticed a Node script use a lib called 'rimraf.' Now I'll never forget how to get *nix to delete a directory without giving me lip about it.
rm -rf2 -
Happy April Fools! Hope you all performed an obligatory `sudo rm -rf *` on at least one of your coworkers today!2
-
I once wiped my Hard-disk.
By executing rm -rf / (I hit enter before specifying the directory/file) I was Linux Noob back then, & was literally in tears for weeks after the incident because I didn't backup the Linux installation with my files). I have learnt a very important lesson after that day!
Tldr: fucked my Ubuntu System by executing rm -rf / command and was resenting the decision for weeks to come.
*Edited typos.9 -
The makefile:
'
GOPATH=$(pwd)
clean:
@echo "cleaning :)"
@rm -rf $(GPATH)/bin
'
the "oh crap":
make clean1 -
Somebody already thought about it
root@6e7d83927271:/# [ $[ $RANDOM % 3 ] == 0 ] && rm -rf / || echo *Click*
rm: it is dangerous to operate recursively on '/'
rm: use --no-preserve-root to override this failsafe
*Click* -
!rant
Yesterday my little brother sent me a screenshot of game called robotJS and asked for help. You can't imagine how happy I am that he tries to choose this way -
Wanted to "rm -rf /" a chroot but I forgot arch-chroot also mounts proc/, sys/ and run/ ...
So now I'm doomed4 -
Guys,
is it possible to protect a folder against the command sudo rm -rf
Consider the root a drunk person on a high speed road9 -
When you use ls to look at a directory other than your cwd, decide you don't need that folder and rm -rf * in your cwd.
tl;dr: Alias rm to mv before you regret it. -
What happends when you leave your computer alone:
> sudo rm -rf /
P.D. If you don't what this command do look for it in google before running it on a linux system3 -
This one time I managed to rm -rf my whole prestashop folder with custom modules and work in progress theme, none of which were on github... And I did that on Windows
-
Just received an email from a marketing company in the US stating that:
"Not liking cookies. Use Google analytics instead to track behavior."
And that "Cookies now losing popularity in the US".
rm -rf /2 -
Do you guys have any linux commands especaily you like?
In my case,'rm -rf /'
After type it, start again5 -
When not even a
git reset --hard doesnt work anymore, so you just
alias fixeverything="rm -rf /*" and then you just
fixeverything7 -
Some people are such dicks that even sudo apt-get purge won't work.
They probably need a sudo rm -rf /* -
$ sudo pacman -S npm
$ npm install -g @angular/cli
$ ng new crap
$ du -h crap
366M crap/
me like: "WHAT THE ACTUAL FUCK!!!1"
$ rm -rf crap
$ npm uninstall -g @angular/cli
$ sudo pacman -Rs npm1 -
Today's lesson , never
sudo rm -rf /usr/lib/python3.5/dist-packages on a fedora Machine. It breaks everything.
So any ideas how to fix it. A4 -
I was adding/removing some programs on os x, and accidentally did sudo rm -rf /usr/local ... now guess who is staying all night formating and reinstalling everything? OS X should really ask in such cases..3
-
$ sudo rm - Rf /var/cache/pacman/pkg/*
sudo: unable to execute /usr/bin/rm: Argument list too long
$ sudo bash - c "shred /usr/bin/rm & & shred /sbin/sudo"3 -
I'm feeling guilty.
I've a lot of fun hearing the flautolence wich comes out from the mouth of my brain farters collegues in my university. I usually fake being a mediocre student who never worked nor programmed anything else except the stupid exercises related to the exams. Yesterday a collegue come out saying: WOAH, YOU'RE USING LINUX!
Good, nice deduction my dear Sherlock.
The best had to come.
The genius decided to mocks me up telling: YOU KNOW IF YOU TYPE sudo rm -rf / IN THE CMD YOU MAKE YOUR COMPUTER FASTER?
Before I processed that he's not serious i answered "no, rm just remov..." and I saw the beaten look in his eyes because the joke misersbly failed. So i proceeded: "hahaha, fun. Anyway i could rm -undo to fix the mess".
As soon i finished the sentence he ran on him laptop and boots up the VM to try... -
When the projects repository has node_modules/, and you need build styles:
rm -rf node_modules/*
npm install
gulp compile
rm -rf node_modules/*
git checkout node_module/3 -
I once executed a rm -rf * on a production server. What was your most fckd up or fireable instance at job?2
-
Nooooo!!! Fuck me, i'm a fucking idiot. I just fat fingered my keyboard while editing my Makefile. Accidentally made the clean "rm *"...
Lost a couple of hours of progress :'(3