= 2018-02-21 = == xargs , find == * 常常忘記 xargs 怎麼把 STDIN 的結果拿來當後續指令的參數, 備忘一下:使用 `-I` 參數 * 參考: https://unix.stackexchange.com/questions/90886/how-can-i-find-files-and-then-use-xargs-to-move-them {{{ find /tmp/ -ctime -1 -name "x*" | xargs -I '{}' mv '{}' ~/play/ }}} * 當然也可以用 find 指令自己的 `-exec` 參數 {{{ find /tmp/ -ctime -1 -name "x*" -exec mv '{}' ~/play/ }}} == 休假攻略 == * [[Image(https://media.bnextmedia.com.tw/image/album/2018-02/img-1518499339-22571.jpg)]] * [[Image(https://media.bnextmedia.com.tw/image/album/2018-02/img-1518499368-36578.jpg)]]