diff - filename ã¨ãã«ã¤ãã¦ã®ã¡ã¢
ls > oldfilelist # add new file or remove existing file in . ls | diff - oldfilelist
çãªãã¨ããããæã«ã- ã¨ãããªãã·ã§ã³ã¯diffã¨ãã«å®è£ ããã¦ããã ãã§ããããã¼ã¿ãã«(?)ã§ã¯ãªãã®ã§
ls | diff /dev/fd/0 oldfilelist
ã¨ãã風ã«æ¸ãã»ãããã·ã ãã¨ãã話ã
Linuxã§ã¯/dev/fdã¯/proc/self/fdã®ã·ã³ããªãã¯ãªã³ã¯ãªã®ã§ã
ls | diff /proc/self/fd/0 oldfilelist
ã¨æ¸ãã¦ãåãã
ãã対象ãstdinã§ããå ´åã«ãã£ã¨åãããããã®ã¯
ls | diff /dev/stdin oldfilelist
ã ã¨ããããã¯OS Xã§ãåãã