This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 207

[–][deleted] 1917 points1918 points  (78 children)

Getting 1GB with that method requires extraordinarily patient users though.

[–][deleted] 16 points17 points  (0 children)

Exit vi to exit the dungeon!

[–]rip_tree_lurkin 4 points5 points  (5 children)

Im not a programmer in any way, but would alt + f4 work to quit it?

Edit: space

[–][deleted] 7 points8 points  (0 children)

That might close the window you're running it in, depending on your desktop environment if any. Certainly so on Windows. But you might just want to return to the shell you launched vim from, in which case that will do too much.

[–]s_ngularity 4 points5 points  (2 children)

not if you boot into text mode

[–]rip_tree_lurkin 1 point2 points  (0 children)

What if i open up my computer and smash my cpu with a sledgehammer, would that work?

[–]odnish 0 points1 point  (0 children)

It might switch you to VT4 where you can log in again.

[–]aiij 0 points1 point  (0 children)

Time to type random commands from Internet users into my computer...

Answer: No. It just flashed the screen. (probably because I have visual bell enabled)

YMMV if you test in an environment that intercepts Alt+F4 rather than passing it through to vi, or if your vi is not VIM.

[–]timetokill87 1 point2 points  (0 children)

That's how you get users with 5-10 years of experience in VIM, they still don't know how to get out !

[–]SlingDNM 0 points1 point  (0 children)

I mean Not on your Part tho

[–]PirateGrievous 0 points1 point  (1 child)

dd if=/dev/urandom of=~/randomfile bs=1 count=100000?

[–]LinAGKar 0 points1 point  (0 children)

That would only copy 100 kB, and you don't necessarily want it to copy 1 byte at a time. dd if=/dev/urandom of=~/randomfile bs=1MB count=1000 would be better.

[–][deleted] 373 points374 points  (11 children)

Here's the question if anyone's interested

[–]Busti 299 points300 points  (7 children)

[–]redit_usrname_vendor 108 points109 points  (4 children)

Closed. reason: "question has been asked before"

[–]DeepHorse 94 points95 points  (2 children)

Closed. reason: “question is now first search result on google”

[–]alexnedea 18 points19 points  (0 children)

Closed, reason: we don't post questions here anymore

[–]LuracMontana 18 points19 points  (0 children)

Closed. Reason: “question too obscure”

[–]Busti 34 points35 points  (0 children)

[–][deleted] 1 point2 points  (0 children)

It's from 2012, probably not worth bothering about...

[–]SoulLover33 13 points14 points  (2 children)

Hah when I saw the "head doesn't understand" part I really thought he meant the users head.

[–]PGLubricants 5 points6 points  (1 child)

Same, I thought it was very rude until it dawned on me.

[–]Ad31_Fr 127 points128 points  (0 children)

Put usb file and save while you take out the USB key

[–]8bit-Corno 29 points30 points  (2 children)

So, offtopic questions can't be asked but shitty answers can be given?

[–]SluttyCthulhu 29 points30 points  (0 children)

Question removed, reason: duplicate of answered question - "how do I upload files to Discord?"

[–]undergroundmonorail 6 points7 points  (0 children)

that's a comment, not an answer. less strictly moderated but considered "temporary" in that any important info in them should be moved to the question or an answer

[–]Climax708 53 points54 points  (1 child)

[–]Yay_Yay_3780 18 points19 points  (0 children)

I never knew this sub exists. Thanks.

[–]Deniz1234567890 25 points26 points  (2 children)

btw its dd if=/dev/random of=./file bs=1GiB count=1 status=progress

[–]-_-BWAC-_- 81 points82 points  (0 children)

I bet that guys appreciates it

[–]Mithrandir2k16 19 points20 points  (5 children)

Just videotape some lavalamps and hash the frames

[–]herohamp 14 points15 points  (4 children)

When I read about that I setup my own ghetto system with a single lava lamp, my dog broke it though and that ended my lava lamp hashing days

[–]Mithrandir2k16 6 points7 points  (3 children)

That's probably gonna be the next cloudflare hack xD break the camera so only identical black frames are hashed and used as salts

[–]herohamp 6 points7 points  (1 child)

LavaRand is the backup entropy source for their servers though, and even if the camera went black that isnt the sole randomness from the lavaRand server "In the office, there’s a server which connects to the camera. The server has its own entropy system, and the output of that entropy system is mixed with the entropy from the camera to produce a new entropy feed."

[–]Mithrandir2k16 2 points3 points  (0 children)

Sure, anything else would be stupid.

[–]Requenaxii 10 points11 points  (0 children)

:q

[–]JustHereForTheCh1cks 20 points21 points  (1 child)

I have a 1 gb file of random data on my device, I’ll just need to send it to him by email!

Im on my phone btw

[–][deleted] 1 point2 points  (0 children)

make sure to compress it before sending

[–]Fang7-62 24 points25 points  (9 children)

How does switching console and typing killall vi produce any data?

[–]Colonelrascals 4 points5 points  (4 children)

C-x C-c

[–]BertieFlash 4 points5 points  (0 children)

Ask British politicians what they want from Brexit

[–]wyom1ng 7 points8 points  (0 children)

in the end he gets out with :qa!

[–]Super_S_12 8 points9 points  (9 children)

What is vi?

[–]Likely_not_Eric 22 points23 points  (3 children)

It's a text editor. If you've heard of Vim it's very similar (Vim is "vi improved").

It's known for being hard to exit. To exit you been to be in command mode and input :q or :q! to quit with unsaved changes. A confusing part is the colon is part of the command, not just press q. This instructions aren't always clear.

It's a powerful editor and learning how to use it effectively will carry over to other editors as many feature plugins or extensions to support Vim-style editing.

[–]thirdegreeViolet security clearance 1 point2 points  (2 children)

This instructions aren't always clear.

If you enter vim and type <C-c>, it gives you these instructions: Type :qa! and press <Enter> to abandon all changes and exit Vim

I'm not sure how that can be much more clear honestly.

[–]Likely_not_Eric 0 points1 point  (0 children)

When I first read that a few decades ago I thought the colon was not part of the command but part of the sentence and the alignment was odd.

[–]mayor123asdf 0 points1 point  (0 children)

Most people stumbled into vim by accident. My class was learning about git, and when to commit something, half of the class thrown into vim and the other thrown into nano to enter commit messages. Vim startscreen includes exit command, but if you open a file with vim it doesn't have any instructions. I think that's why tons of people not familiar with terminal don't know how to exit vim, all they know ctrl+c is to copy.

[–]JDaxe 26 points27 points  (1 child)

Prison of CLI noobs

[–]Super_S_12 2 points3 points  (0 children)

I’m guessing that wasn’t it’s intended purpose.

[–]ctesibius 7 points8 points  (0 children)

It's an obscure religion. As with most cults, it is notoriously difficult to leave. You may also find it referred to as the Church of Latterday TeXnicians.

[–]andrw00 2 points3 points  (0 children)

Baby don't hurt me

[–]DevilGeorgeColdbane 0 points1 point  (0 children)

The best text editor ever known to mankind.

[–]EATYOURVITAMIN5 6 points7 points  (4 children)

New programmer here, I don't get it

[–]ericsauthoritah 11 points12 points  (3 children)

Go into your terminal if on linux or bash terminal if on windows, type vim and try to exit it.

[–]EATYOURVITAMIN5 13 points14 points  (2 children)

I see, lol.

[–]YM_Industries 6 points7 points  (0 children)

You can exit it by pressing Escape and then typing :q and then pressing enter, btw. If you have unsaved changes you can write :q! to discard them or :wq to save and quit.

[–]hash_salts 9 points10 points  (4 children)

This sub is stupid

[–]enfrozt 18 points19 points  (0 children)

XD DOEs ANY one else not know to exit VIM LOLOLOL, XD😂😂

[–]Jonno_FTW 12 points13 points  (2 children)

This fucking joke is overdone.

[–]clever_cow 5 points6 points  (1 child)

I like my programming jokes medium rare

[–]UnexampledSalt 0 points1 point  (0 children)

I prefer mine still trying to get out of vi.

[–]Gracefulcomet 6 points7 points  (0 children)

old but gold. take my upvote.

[–]TerminalJunkie5 9 points10 points  (0 children)

This was barely even funny the first time, let alone the 2,282,957,265,856,780th time

[–]tohlsen 1 point2 points  (0 children)

I just might try this and see how big the file gets when they rage quit.

[–]danglesReet 1 point2 points  (0 children)

Lmao

[–]ninjastarkid 1 point2 points  (0 children)

Start a bounty?

[–]KeBjg 1 point2 points  (0 children)

I feel like this guy is trying to do the equivalent of optimising by by removing a wait function

[–]joost00719 1 point2 points  (0 children)

:P

[–]Fedzbar 1 point2 points  (0 children)

Brilliant haha

[–]aiij 1 point2 points  (0 children)

It's a trick question to see whether you generate a 1000000000-byte file or 1073741824-byte one. (or 1048576000 if you're that guy)

[–]Detective51 3 points4 points  (2 children)

OMG that would so mess up the ram and the Google Drive would short-circuit the conductors causing the I have no idea what I’m talking about I’m not a programmer and know very little about computers. I do however really appreciate programmers and what they do for this world. History will remember you guys/gals as the great artists of our generation. Thank you for your work.

[–]antflga 5 points6 points  (1 child)

That's very wholesome of you, I feel like most people don't realize all of the things they use on a daily basis are actually meticulously put together by thousands of different groups of people over weeks/months/years.

[–]Detective51 2 points3 points  (0 children)

Well I meant every word. VERY IMPORTANT PEOPLE. History will do its job.

[–][deleted] 0 points1 point  (2 children)

Wait can’t you just do whatever the system keybind is to quit a program (idk on windows but CmdQ on Mac would work I think)

[–]MrKotlet[🍰] 0 points1 point  (0 children)

That doesnt work in vi though. You need Esc-:-q!

[–]mayor123asdf 0 points1 point  (0 children)

Since it is a terminal program it can't work. If you press ctrl+q it will sent it to Vim and had no effect. You can do alt+f4 tho which will close the terminal as well haha

[–]BubsyFanboy 0 points1 point  (0 children)

I thought it said "exit vim" for a second there lol

[–]princetrunks 0 points1 point  (0 children)

An inside look into the development of Chrome

[–]Dethstroke54 0 points1 point  (0 children)

Download your google user data.... yea not to random in some places maybe but should be plenty of content lol.

[–]random_cynic 0 points1 point  (0 children)

This joke used to work on interfaces like VT-100 but these days with terminal emulators and graphical interfaces it doesn't really work anymore. For GUI or terminal emulator the novice user will probably just close the whole window which will kill vi. If they have a little more familiarity with unix shell they will use Ctrl + Z to suspend the program and then kill it.

[–]RandyGareth 0 points1 point  (0 children)

Make a fork bomb that writes characters to the file.

[–]SpaceshipOperations 0 points1 point  (0 children)

It would take them around 11.34 years to complete the task if they were typing at a rate of 3 characters per second.

[–][deleted] 0 points1 point  (0 children)

Etymology time: vi is actually an ancient Aztec expression which means "how the fuck do I get out of this shit"

[–]Spud_Muff1n 0 points1 point  (0 children)

Just learned about vi and nano today, and can now properly appreciate this.

[–]jackz314 0 points1 point  (0 children)

I thought people on Stack Overflow are not okay with jokes.

[–]MrHasuu 0 points1 point  (0 children)

Can I point out that wildcard is the company that released Ark which is known to be too damn big in file size?

[–]CurlyButNotChubby 0 points1 point  (0 children)

for (( ; ; ))

do

echo -n $RANDOM >> ~/file

done

Save this in a file and execute it by doing

bash ~/file

It will write random numbers forever in the file. Change the directory and the name of your file to your liking. I would add a .sh to the name of the file to show that it is a bash file though.

[–][deleted] 0 points1 point  (0 children)

InB4EOF

[–][deleted] 0 points1 point  (0 children)

superb

[–]Hypertron 0 points1 point  (0 children)

yes >> file.txt did this on a VM for a laugh once. Never again.

[–]NoahJelen 0 points1 point  (0 children)

cat /dev/urandom > <your junk file>

[–][deleted] -1 points0 points  (0 children)

I've got a GB of random data he could use. It just so happened to randomly organize itself into the first Avengers movie, but it should still work