0
\$\begingroup\$

Let's waste some time coming up with stupid ideas which are close cousins of good ideas.

  • Your useless command doesn't have to fit any minimum or maximum length.
  • Do, however, try to turn it into a one-liner if you can.
  • No particular requirement for what shells and utilities are used, within reason.
  • He who wins, wins.
  • More rules will be added if they are added.
\$\endgroup\$
4
  • \$\begingroup\$ Why was I down-voted, if I may ask? \$\endgroup\$
    – user155406
    Jan 1 '14 at 3:26
  • \$\begingroup\$ This question appears to be off-topic because it lacks a clear spec \$\endgroup\$ Jan 1 '14 at 8:45
  • 2
    \$\begingroup\$ I would guess that you found this site via the hot list or Reddit. There has been a lot of activity recently around questions which do not represent what this site is about, and the long-term members are trying to get things under control. The downvotes will be people who are fed up of subjective nonsense and want to return to objective challenges with clear criteria. \$\endgroup\$ Jan 1 '14 at 8:50
  • \$\begingroup\$ cat /dev/random \$\endgroup\$ Jan 6 '14 at 11:33
3
\$\begingroup\$

Mine is the inverse of "print the kernel arguments you booted with on Linux":

cat /proc/cmdline
# turns into...
fgrep -x -f <(awk -F\= 'BEGIN { RS = " "} ; {print $1"="}' </proc/cmdline)\
-v <(curl 'https://www.kernel.org/doc/Documentation/kernel-parameters.txt' 
2>/dev/null | awk '/\t+[a-z._]+=/ {print $1}' | tee test2) | tr '\n' ' ' &&
echo

a screenshot of the command and output in terminal

\$\endgroup\$
2
\$\begingroup\$
ls > /dev/null

Simple yet utterly pointless. :-P

For people who don't know shell commands: ls lists the files in a directory, and > /dev/null basically hides the output.

\$\endgroup\$
2
  • \$\begingroup\$ short and to the point, I should have anticipated this... \$\endgroup\$
    – user155406
    Jan 1 '14 at 1:55
  • \$\begingroup\$ might be useful to detect errors, also changes access times \$\endgroup\$ Jan 1 '14 at 15:34
2
\$\begingroup\$

Once or twice a week i tend to misspell ls so i run sl. It's not installed by default in Ubuntu (or perhaps other), so if no magic happens try installing it.

It's quite cool, at least the first few times, as it behaves differently with some common options to ls as well and it seems to have blocked signals so you cannot quit it until it's shown you what it can do...

\$\endgroup\$
1
  • \$\begingroup\$ When I was on Ubuntu, I installed the "sl" package from APT and it was some lame ASCII animation of a [s]team [l]ocomotive... nothing evil like you mentioned. I'm looking for the real thing now on Fedora... it sounds awesome. \$\endgroup\$
    – user155406
    Jan 1 '14 at 3:24
2
\$\begingroup\$

Not sure if invoking python counts. This'll start a web server, open your default browser, and show the information you'd usually see on the console :-)

python -m SimpleHTTPServer &> index.html & x-www-browser localhost:8000

Press F5 a few times, and...

127.0.0.1 - - [31/Dec/2013 20:27:59] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:02] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:03] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:03] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:03] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:03] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:04] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:04] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:04] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:04] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:04] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:05] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:05] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:05] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:05] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:06] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:06] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:07] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:07] code 404, message File not found 127.0.0.1 - - [31/Dec/2013 20:28:07] "GET /favicon.ico HTTP/1.1" 404 - 127.0.0.1 - - [31/Dec/2013 20:28:07] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:08] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:08] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:08] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:08] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:08] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:09] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:09] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:09] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:09] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:09] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [31/Dec/2013 20:28:10] "GET / HTTP/1.1" 200 -

To shut down the server, run the fg command, and then press Ctrl-C.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.