Commands by regulatre (2)

  • Change the scale to adjust number of decimal places prefix the command with "time" to benchmark the computer (compare how long it takes to calculate 10000 digits of pi on various computers). Show Sample Output


    0
    echo "scale=1000; 4*a(1)" | bc -l
    regulatre · 2014-07-31 19:13:26 0
  • Copy a local directory to a remote server using ssh+tar (assume server is lame and does not have rsync).


    0
    tar -vzc /path/to/cool/directory | ssh -q my_server 'tar -vzx -C /'
    regulatre · 2014-07-31 18:42:57 0

What's this?

commandlinefu.com 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

Run a command multiple times with different subcommands
it's nice to be able to use the command `ls program.{h,c,cpp}`. This expands to `ls program.h program.c program.cpp`. Note: This is a text expansion, not a shell wildcard type expansion that looks at matching file names to calculate the expansion. More details at http://www.linuxjournal.com/content/bash-brace-expansion I often run multiple commands (like apt-get) one after the other with different subcommands. Just for fun this wraps the whole thing into a single line that uses brace expansion.

Get your X11 screen mode

remote-pbzip2 and transfer a directory to local file

ping as traceroute
This command uses ping to get the routers' IP addresses to the destination host as traceroute does. If you know what I mean..

Mac osx friendly version of this terminal typing command at 200ms per key

Open a file at the specified line
You may also use +line:column syntax.

HourGlass
Displays an animated hourglass for x amount of seconds

When was your OS installed?
shows also time if its the same year or shows year if installed before actual year and also works if /etc is a link (mac os)

Install pip with Proxy
Installs pip packages defining a proxy

count how many cat processes are 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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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: