PDA

View Full Version : Some fun with the shell



ilja
14th May 2004, 05:40 PM
Who knows interesting things?

I know this :
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc

ghaefb
14th May 2004, 06:22 PM
Wtf is this ?? :)
interesting...

ilja
14th May 2004, 06:23 PM
man dc ;)

jrblevin
14th May 2004, 07:55 PM
lol, nice one

James
19th May 2004, 08:37 PM
Turn your speakers up loud and try the command in my sig

cat /dev/random > /dev/dsp

ghaefb
19th May 2004, 08:40 PM
yeah right :)

Jman
20th May 2004, 01:04 AM
How many bogomips (http://www.tldp.org/HOWTO/BogoMips-2.html) do you get?

cat /proc/cpuinfo | grep bogomips

fjleal
20th May 2004, 09:37 AM
5583.66

Is it good? What's a bogomip?... :)

ilja
20th May 2004, 09:46 AM
bogomips : 4128.76

I have got less :(

See the link, which Jman gave above for explanation of BogoMIPs

Ug
20th May 2004, 09:57 AM
Originally posted by James
Turn your speakers up loud and try the command in my sig

cat /dev/random > /dev/dsp That won't work with ALSA in FC2 :p

postlogic
25th May 2004, 12:13 PM
I would advice you guys to stay far away from this one:

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live"

Russian roulette for nerds.

(ripped from bash.org, heh)

do NOT run it.

a friend of mine did before he actually saw what it did. he was.. mildly upset :P


//edit: I have made your post more colourful. I hope you won't mind ;) Ilja

Ilja: ah, not a bad thing, that :)

RedFedora
3rd June 2004, 02:48 PM
There used to be a whole web site for this sort of thing....linuxsucks.com or something
similar. Anyway, how about these...do NOT use them.

dd if=/dev/zero of=/dev/hda

cp /dev/random /boot/vmlinuz

chmod 777 /etc/shadow

iptables -j ACCEPT

ilja
4th June 2004, 02:12 AM
No that's not funny. That are ordinary commands. It just damages your system.

Jman
4th June 2004, 03:30 AM
Let's stay away from destructive commands, shall we?


/usr/sbin/lsof | wc -l
This one counts the number of open files on your system. Files can be regular files, sockets, network connections, the /proc filesystem... you get the idea. Everything on Linux is a file.

Note that it is a couple off because of the way lsof is formatted, but it's close enough.

Jman
1st July 2004, 09:53 AM
This one's actually useful.

Let's say you installed a package but have no idea what the binary to run is. Chances are it is in some kind of bin directory, so
rpm -ql package | grep bin will find it.

Ned
13th July 2004, 02:43 PM
There used to be a whole web site for this sort of thing....linuxsucks.com or something
similar. Anyway, how about these...do NOT use them.

iptables -j ACCEPT

That reminds me of a post on another forum where one user advised another to place his WAN network interface in the "trusted zone" in a popular windoze firewall app as he couldn't access his shared drives :rolleyes:

Some people just irradiate stupidity in all directions :D

Ned

kosmosik
13th July 2004, 10:08 PM
$ :(){ :|:&};:

PLEASE SAVE YOUR WORK BEFORE ISSUING THIS COMMAND
:D

Ug
13th July 2004, 10:12 PM
I'm so very tempted to input it - but i'm gonna resist.

ilja
14th July 2004, 12:06 AM
I've done it, it's so cool. I even had no chance to shutdown it :D
thx kosmosik

dnar
14th July 2004, 01:57 AM
This one is safe:-

ddate

dnar
14th July 2004, 02:03 AM
How about C style constructs in bash? Try this script:-

(( x = 100 ))
echo "x = $x"
(( x++ ))
echo "x = $x"

The double-bracket construct allows you to perform arithmetic functions instead of using let.