地味に欲しかった機能がいつの間にか実装されていた。

takiuchi% rake -T db:create                                  [~/test]
(in /home/takiuchi/test)
rake db:create      # Create the local database defined in config/database.yml for the current RAILS_ENV
rake db:create:all  # Create all the local databases defined in config/database.yml

これで rake db:create:all と打てばdatabase.ymlに記述されているデータベースが作成されるわけですね。

posted by Png genki on Mon 12 Nov 2007 at 15:56

topコマンドは、通常CPUの使用率が高い順にプロセスを表示しますが、topコマンドを実行した状態で「Shift+M」を押すと、メモリの使用率が高い順に表示するようになります。メモリ消費量が多いプロセスを特定したい時に便利ですね。

元に戻したい場合は、「Shift+T」を押せばOK。ほかにも以下のような機能があります(topコマンド実行時に「h」キーを押せば表示されます)

  Z,B       Global: 'Z' change color mappings; 'B' disable/enable bold
  l,t,m     Toggle Summaries: 'l' load avg; 't' task/cpu stats; 'm' mem info
  1,I       Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode

  f,o     . Fields/Columns: 'f' add or remove; 'o' change display order
  F or O  . Select sort field
  <,>     . Move sort field: '<' next col left; '>' next col right
  R,H     . Toggle: 'R' normal/reverse sort; 'H' show threads
  c,i,S   . Toggle: 'c' cmd name/line; 'i' idle tasks; 'S' cumulative time
  x,y     . Toggle highlights: 'x' sort field; 'y' running tasks
  z,b     . Toggle: 'z' color/mono; 'b' bold/reverse (only if 'x' or 'y')
  u       . Show specific user only
  n or #  . Set maximum tasks displayed

  k,r       Manipulate tasks: 'k' kill; 'r' renice
  d or s    Set update interval
  W         Write configuration file
  q         Quit
          ( commands shown with '.' require a visible task display window )
posted by Png genki on Mon 12 Nov 2007 at 00:56
Contents
データベースを作成するRakeタスク
topコマンドでメモリ消費量の順にソートする
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
瀧内元気: おお、チェックしてみます。thx! '11-12
overisland: Reeder for iPhone もこの UI を実装していますね。 '11-12
瀧内元気: その情報は見たのですが、以下のサイトによると、現在はまた必要になってるっぽいんですよね。 ... '11-12
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ