タグ

linuxとunixに関するkgbuのブックマーク (7)

  • 地雷だらけのrsyncを理解する。 - こせきの技術日記

    rsync -avz --exclude-from=pattern-file --delete SRC/ DEST SRCの末尾に/をつける。たいてい必要。 SRCスラッシュの有無は、mv SRC DEST と mv SRC/* DEST の違いと一緒。スラッシュの後ろに*が省略されているものと考える。 DESTのスラッシュの有無は関係なし。 --dry-run(-n)をつけて試す。 SRC、DESTともローカルのディレクトリを指定して試す。 DESTはまず空ディレクトリで試す。DESTが同期済みだと何が更新されるのか正確にわからないので。 --list-onlyをつけてファイル一覧を得る。 DESTを省略してファイル一覧を得る。 --list-onlyと同じ? --deleteはDESTのファイルを根こそぎ削除する可能性がある。注意。 --delete-excludedは使わない。--d

    地雷だらけのrsyncを理解する。 - こせきの技術日記
    kgbu
    kgbu 2009/06/25
    情報源へのリンクあり。rsyncは強力だから注意。delete-excludedは使ったことがないから悲惨な思い出は無いw rsync専用の鍵はサボっていたな。
  • All commands

    The 30 means start extracting frames from 30 seconds into the video. The 3 means extract the next 3 seconds from that point. The fps can be adjusted based on your preferences. The 320 is the width of the gif, the height will be calculated automatically. input.mp4 is the video file, which can be any video file ffmpeg supports. The output.gif is the gif created. ffmpeg -ss 30 -t 3 -i input.mp4 -vf "

    kgbu
    kgbu 2009/02/06
    UnixのコマンドのTipsを投稿できる。1行でどこまでできるか。現実にはshellではセミコロンで区切ればかなり長いプログラムも入力できちゃうけど、そんな美しくないのは人気がなさげ。diff < a < b は面白かった
  • 3分 Code Reading - date編

    晩飯くってまったりしている頃にIRCを見ると次のような会話が。22:44 <yaegashi> unix time からふつうの時刻表記に直すのはどうやる 22:44 <yaegashi> irb とかつかわずに 22:45 >ukai< % ruby -rtime -e 'puts Time.at(1234567)' 22:46 <yaegashi> いやだから ruby とかつかわんで(わら 22:46 <ar-m> dateコマンドで 22:46 <yaegashi> date(1) でなんとかできんのかな 22:46 <ar-m> できそうなもんだけどな そうだなあ と思い、ちょっと調べてみることにした。 出力する方はdate +%sだけど逆はないものか。 まず何も考えずに% date -d "$(date +%s)" date: invalid date `1223478096'

    kgbu
    kgbu 2008/10/14
    In the GNU project, man pages are secondary. というのは盲点だった。そっかー[programming]
  • Makefileの書き方、その勘どころ - 檜山正幸のキマイラ飼育記 (はてなBlog)

    「ほとんど忘れた、Makefile」 にて: Makefileなんてもう何年も書いたことがないぞ。ウーン、だめだ、忘れている。 「忘れている」ってよりは、僕の知識じゃ古すぎて、改めて勉強しないとダメでした*1。 なにしろ、makeだけじゃ機能が貧弱なんで、cpp(Cプリプロセッサ)やm4(マクロプロセッサ)と組み合わせて使っていた頃しか知らんからね(古すぎ!)。今じゃGNU Makeを(使おうと思えば)どこでも使えるから、GNU Makeを習えばそれでいいじゃないかな。僕は、Windows上のMSYS(MinGW - Minimal SYStem)でGNU Makeを動かしました。 というわけで、GNU Makeの手習いをしたからメモしておきます。以下、名前がMakefileじゃなくても、GNU Makeへの指示を書いたファイルは何でもMakefileと呼びます。 [追記]id:paell

    Makefileの書き方、その勘どころ - 檜山正幸のキマイラ飼育記 (はてなBlog)
  • The GNU Operating System and the Free Software Movement

    What is the Free Software Movement? The free software movement campaigns to win for the users of computing the freedom that comes from free software. Free software puts its users in control of their own computing. Nonfree software puts its users under the power of the software's developer. See the video explanation. What is Free Software? Free software means the users have the freedom to run, copy

  • Manpage of BASH

    Section: User Commands (1) Updated: 2001 Mar 5 Index JM Home Page roff page 名前 bash - GNU Bourne-Again SHell 書式 bash [options] [file] 著作権 Bash is Copyright (C) 1989-2001 by the Free Software Foundation, Inc. 説明 bash は、標準入力やファイルから読み込んだコマンドを実行する、 sh 互換のコマンド言語インタプリタです。 bash には、Korn シェルや C シェル (ksh や csh) の便利な機能も採り入れられています。 bash は IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2) に準

  • 68user's page

    UNIX/Linux の部屋 に、bash の内部コマンド select コマンド を追加しました。メニュー形式の選択肢を提示し、ユーザに選ばせることができるコマンドです。

  • 1