Commands by jaymcgavren (2)

  • Purely frivolous - print a sine/cosine curve to the console - the width varies as it progresses. Ctrl-C to halt. Show Sample Output

    ruby -e "i=0;loop{puts ' '*(29*(Math.sin(i)/2+1))+'|'*(29*(Math.cos(i)/2+1)); i+=0.1}"
    jaymcgavren · 2010-03-09 06:21:29 1
  • Use Ruby's standard Curses module to display a Lissajous curve in the console. Replace the "0.2" with different numbers for different curves. Show Sample Output

    ruby -rcurses -e"include Curses;i=0;loop{setpos 12*(Math.sin(i)+1),40*(Math.cos(i*0.2)+1);addstr'.';i+=0.01;refresh}"
    jaymcgavren · 2010-03-09 06:10:47 1

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Check These Out

Find the package that installed a command

Find the package that installed a command

Jump up to any directory above the current one
Usage: upto directory

Job Control
background and disown, but with a proper one-line syntax

Find the package a command belongs to on debian-based distros
Advanced revision to the command 8776 . This revision follows symbolic links. The quotation-marks surrounding $(which $1) allows for graceful handling of errors ( ie. readlink does not complain incase 'which' command generates (null) output)

tcpdump from src to dst
then open with wireshark

read Windows ACLs from Linux
You can read, add, delete and modify Windows permissions from Linux using smbcacls from the smb-client package.

Query Wikipedia via console over DNS

Determine an image's dimensions
Simple use of ImageMagick identify function.

list services running (as root)
A quick way to list services running

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: